The symptoms were as follows:
- User enters web application.
- Page 1 loads and saves user-specific data to a cookie marked to expire one day from now.
- User navigates to Page 2.
- Page 2 loads and tries to pull data from new cookie.
- Cookie doesn't exist; page bombs out and sends user back to Page 1.
After testing the application on multiple other machines with successful results, I concluded that the issue was unique to the one machine. The first thing that popped into my mind was that there must be some type of internet security setting that was causing cookies to be rejected. I've ran into this before, and it's usually easily corrected by modifying the Privacy settings under Internet Explorer - Tools - Options. I reduced the security settings there and was dismayed to see absolutely no change in the behavior of the application.
At this point I turned to Google, and for one of a very few times, it failed me. I decided to give the forums of experts-exchange.com a shot (not to be confused with expert-sexchange.com). I poured my heart out and waited a day hoping for the best, but this one seemed to stump the "experts" too.
By this time, I had exhausted nearly every avenue that I knew of to dig up a solution, and I felt that I had allocated way too much time to this issue. So, I decided to perform a point-in-time restore of Windows XP hoping to whatever demons had crept into the system would be exorcised. When I began the restore process I ran into another curious problem. None of the dates corresponded with the proper days of the week. After a quick head scratch, I checked the system clock, and found that the year had been advanced from 2008 to 2009.
Suddenly it all made sense; the cookies were getting dropped by the client because the expiration date was getting set to what the client perceived to be nearly a year in the past. It turns out that the user had clicked on the calendar to check some date from next year and did not realize that she had actually adjusted the current date to next year. Incidentally, this is not an issue on Vista machines as the calendar is read-only by default (this is one of the few times I'll actually give Vista some props).
So, long story short, if you ever find yourself trying to figure out why cookies seem to be getting dropped for no reason, a good thing to check is the system clock.
0 comments:
Post a Comment