1

my web app sign out every one minute, .aspxauth cookie set to (20 days) and asp.net_sessionid set to (session end), i want to make my site (remember me).

i am using the below code -but to no avail-:

<authentication mode="Forms">
    <forms
    loginUrl="~/Account/Login.aspx"
    protection="All"
    timeout="30160"
    name=".ASPXAUTH"
    path="/"
    requireSSL="false"
    slidingExpiration="false"
    defaultUrl="~/Default.aspx"
    cookieless="UseCookies"
    enableCrossAppRedirects="false" />
</authentication>

How do I prevent my app from signing out so often?

  • 1
    I found [this](http://stackoverflow.com/questions/3355601/asp-net-remember-me-cookie) and [this](http://stackoverflow.com/questions/2452656/asp-net-mvc-rememberme) searching SO. – Brian Feb 28 '13 at 20:54
  • thank you so so much :)! i found the solution in this [post](http://stackoverflow.com/a/3175994/1525791) – DreamsDotNet Mar 03 '13 at 00:42

1 Answers1

2

Look like everything is in default setting, so use the following setting.

<forms loginUrl="~/Account/Login.aspx"" timeout="30160" />

In web.config, make sure sessionState either doesn't exist at all or is set to something.

<sessionState timeout="20"/>

If you modified the default form authentication, see this post -

Forms Authentication Timeout

Win
  • 61,100
  • 13
  • 102
  • 181