Thursday, March 12, 2015

IE 11 Cookie Info in URL - Log out

I recently encountered a bug only in IE (11). Each time a user would log in on the production server using IE the url would populate with extra information (it looks like cookie information). Like this:
http://www.mysite.com/(R(ffdsfsdfsddsfdsfdseqqc3rjy))/default.aspx
The site worked fine until the user needed to submit data by clicking the Submit button, instead of posting the form it would head over to the login screen! This did not seem to be a problem on my local machine using the VS debugger.
The code is ASP.net MVC 4.0. I had not see this before but I found a link that had my answer:
http://stackoverflow.com/questions/19725827/internet-explorer-11-session-issue-with-asp-net-4-0
The fix is to change the web.config to include the cookieless attribute.
  1. <authentication mode="Forms">
  2. <forms loginUrl="~/YourLoginUrl" timeout="2880" cookieless="UseCookies" />
  3. </authentication>
Hope that helps!