Results 1 to 2 of 2
  1. #1
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASP: Can't read persistent cookies (VS.NET/IIS 5.1/IE 6.0)

    Greetings to all,

    I'm working on several ASP applications. I'm having some problems reading persistent cookies I've created for storing basic info (sort field, page size, username, etc.).

    The cookies seem to create successfully - I can locate and view the text files in the Cookies folder. The browser will read them immediately after they are created, but will not retrieve them in later sessions.

    I've set the Expires property to one year in the future.

    I've checked my browser settings to make sure cookies are allowed. I've even tried using Netscape 4 and 6 - with the same result.

    Here's the kicker: I recently installed WinXP (Pro) and VS.NET (clean install). The exact same commands worked fine in Windows 2000, but mysteriously won't work in XP.

    I've checked MSKB, books, websites, etc... with no mention of this problem anywhere! <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

    I'm using the following to create the cookie:
    <% Response.Cookies("MyCookie")("SortField") = "Date"
    Response.Cookies("MyCookie")("Direction") = "Ascending"
    Response.Cookes("MyCookie").Expires = DateAdd("yyyy",1,Now())
    %>

    To read:
    <% SortField = Request.Cookies("MyCookie")("SortField")
    Direction = Request.Cookies("MyCookie")("Ascending") %>

    Thanks in advance for any suggestions or thoughts!

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Solved: ASP-Can't read persistent cookies (IIS)

    Ah hA! I found it!

    My problem was actually caused by IIS Administration problems. I was working with the "Application Settings" on the "Virtual Directory" tab of the properties for the folder where the asp files in question were stored.

    I removed the Application name that I had assigned and my cookies magically started working again!

    It blew my mind that I could not find this problem in any help file or Knowledge Base article! Grrrr.....

    Thanks to those of you who took a second to read this post. I hope my frustrations will help someone solve this problem in the future.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •