Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

formsauthentication.setauthcookie default expiration?

I thought it was years, but it is getting cleared within 1 hour.

like image 653
zsharp Avatar asked Sep 18 '09 22:09

zsharp


People also ask

How does FormsAuthentication SetAuthCookie work?

The SetAuthCookie method adds a forms-authentication ticket to either the cookies collection or the URL if CookiesSupported is false . The forms-authentication ticket supplies forms-authentication information to the next request made by the browser.

What is FormsAuthentication FormsCookieName?

Remarks. The FormsCookieName property value is set in the configuration file for an ASP.NET application by using the name attribute of the forms configuration element. The FormsCookieName is used to reference the cookie that stores the FormsAuthenticationTicket information.

How to check form authentication cookie?

The ASPXAUTH cookie is used to determine if a user is authenticated. As far as the location of the cookie, that depends on your browser. If you are using Firefox you can view the cookie by clicking on Tools -> Options -> Privacy. Then scroll down to the domain and expand it to see the cookie and its value.

How form authentication works?

Form Authentication is a token-based system. When users log in, they receive a token with user information that is stored in an encrypted cookie. When a user requests an ASP.NET page via the browser, the ASP.NET verifies whether the form authentication token is available.


1 Answers

According to Explained: Forms Authentication in ASP.NET 2.0, "The default value is 30 minutes":

<system.web>
  <authentication mode="Forms">
    <forms loginUrl="Login.aspx"
           protection="All"
           timeout="30"
           ...
like image 97
RichieHindle Avatar answered Sep 28 '22 16:09

RichieHindle