I am using ASP.NET MVC 3, with form validation (based on the modified vanilla account code that you get with file-> new).
When you log in, I set a cookie with
FormsAuthentication.SetAuthCookie(userName, true);
So this should set a persistent cookie. But if I close the browser and open again when I go to the site, I have to log in again! I can see, using the chrome dev tools, that a cookie (.ASPXAUTH) is created and not deleted when the browser closes, and what happens?
My web.config:
<authentication mode="Forms"> <forms loginUrl="~/Account/LogIn" timeout="10000"/> </authentication>
I am testing this locally, under IIS, if that matters.
Matt Roberts Jan 13 2018-12-12T00: 00Z
source share