2009-10-27 27 views
0

喜現在的問題是這是否cookie過期時?FormsAuthentication.SetAuthCookie

當然,一旦關閉所有瀏覽器就會過期,但它不會讓瀏覽器保持打開狀態,我不知道時間限制。

回答

2

這取決於web.config中的Timeout屬性。

0

在你的web.config文件的System.Web屬性,則必須進行以下設置:

<authentication mode="Forms"> 
    <forms loginUrl="~/Account/Login" timeout="2880" /> 
</authentication> 

那麼你的cookie將取決於您的超時屬性設置的值到期。

相關問題