views:

41

answers:

0

I'm building a site and doing all my tests on the built-in development server of Visual Studio. Things were working just fine but at some point my site stopped using cookies after logging in using forms. Junk was being placed in the URL string and cookies weren't being set. Session variables were being set but apparently those did not hold authentication information because once the junk was removed from the URL my app forgot who I was. This was extra annoying and difficult when my routes were redirecting and losing that junk in the URL which made me think it was a controller problem :(

I added <forms loginUrl="~/Account/LogOn" timeout="2880" path="/" cookieless="UseCookies"/> to my web.config and all is working once again.

Any idea why it changed, or better yet a definitive reason as to why it changed? I noticed that intellisense lets me set AutoDetect as well. Perhaps that is the default, but I still dont understand why things started with cookies and then moved to without. I have a few different apps running on localhost but not concurrently. I wouldn't think that would be a problem