Time-out expiring faster than expected - ASP.NET

8

I have 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'm trying to set that time for 20 minutes in web config but I 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've seen everything in my IIS, I looked at the microsoft forums and other posts here from the OS, however the session continues to fall very fast (thing of a minute or two) ...

    
asked by anonymous 09.07.2015 / 21:20

2 answers

2

Some possibilities:

  • Some aspect of the application is programmatically adjusting the value of session timeout via Session.Timeout ;
  • Some processes are modifying monitored files (such as web.config , or contents of the bin directory) in the application directory, forcing the pool to restart;
  • The session cookie may be being deleted / destroyed.
08.12.2015 / 03:41
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 main application settings prevailed over the internal application, make sure this is not your case.

I hope this helps you in some way.

    
28.07.2015 / 14:59