I've been working through the book, and I've hit a snag in the Try It Out on page 226 "Letting the User Select a Theme".
My cookie doesn't seem to be created. I can load the page, and select the theme from the drop down, which causes the refresh. But if I re-open the page from another tab, or close the browser and re-open it, it defaults back to Monochrome.
I've tried in both Chrome and IE, on both my home computer, and work computer. I don't see anything in my cookie settings that would cause it to be blocked.
I've done some searching on the issue, and I've seen some posts that suggest that cookies will not work if you are loading a page from http://localhost
, which suggest using 127.0.0.1 instead, or setting up something in the hosts file, but 127.0.0.1 won't load the page for me (comes back with a "Bad Request - Invalid Host Name").
I also can't seem to change the the site URL in Visual Studio, possibly because I'm using Visual Studio Express. If I could do that, I might be able to get 127.0.0.1 working, which might let the cookies work. As it is, I'm not sure how to progress from here.