You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Chapter 6: theme cookie expires at the end of the session
Hello Imar,
I refer to pages 214-228 of your book (Themes).
I set my Internet Explorer options to accept all the cookies,
I set the Expires property of my theme cookie to a very long time,
I debugged my app and saw the cookie is created, as expected.
Despite all of the above, when I restart my app, after a few seconds, there is no more cookie and the theme is retrieved from web.config.
Does it work when you open the full source of the site that comes with the book? (Try opening the code for Chapter 18). If that doesn't work, there may be something blocking cookies on your machine (security software, network policies, etc). Have you tried a different browser?
Than you for your hint.
The code works with Chrome and Firefox. I mean, the theme cookie is saved at the end of the session and when I restart the app, the theme is retrieved from the cookie, not from web. config.
The problem is with Internet Explorer (version 9), despite I set the option to accept all the cookies.
Hmmm, not sure what's going on then. Could be anything ;-) Are you running IE as an Adminstrator? (E.g. starting it from Visual Studio in "Run As Administartor" mode?