Time-out expiring faster than expected - ASP.NET

Asked

Viewed 1,730 times

8

I am with an application that is working ok, however, when I spend a little time without interacting with the page the user authentication drops and the system returns to the login screen. i am trying to set this time to 20 minutes on web config but could not.

<authentication mode="Forms">
  <forms loginUrl="~/Login.aspx" timeout="20" />
</authentication>

<sessionState timeout="20"></sessionState>

...

<customErrors mode="Off" />
    <machineKey decryptionKey="AutoGenerate,IsolateApps" validationKey="AutoGenerate,IsolateApps" />

in app Settings

<add key="aspnet:MaxHttpCollectionKeys" value="2000" />

I saw everything on my IIS, I looked at the microsoft forums and other posts here from the OS, but the session keeps falling very fast (about a minute or two)...

  • 2

    Hello, welcome to SO-Portuguese. To get answers here, your question must be in Portuguese. You can translate it, or you can post it in English in stack overflow (English).

2 answers

2


Some possibilities:

  • Some aspect of the application is programmatically adjusting the session timeout value via Session.Timeout;
  • Some process is modifying monitored files (such as web.config, or contents of the directory bin) in the application directory, forcing the pool to restart;
  • Session cookie may be deleted/destroyed.

1

Apparently your web.config is correct. It may be that what I say now is bullshit, but I’ve been through some situations where an application was in a virtual directory and the settings of the main application prevailed over the internal application, check if this is not your case.

I hope this helps you somehow.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.