Developer forum

Forum » Development » Session timeout on intranet

Session timeout on intranet

Christoffer Andersen
Reply
Hi there

I have some customcode in which i log a user in on the intranet. After the login I set the following timeout
HttpContext.Current.Session.Timeout = 240; 

Alongside I have set the iis sessionstate to 240 and doubblechecked the web.config file
 <sessionState cookieless="UseCookies" mode="InProc" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" stateConnectionString="tcpip=127.0.0.1:42424" timeout="240" />
        <httpRuntime executionTimeout="600" maxRequestLength="204800" useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true" />

Still however after running some tests I am logged out after less that an hour.
So my question is:
Do I need to st any other attributes?
Is Dynamicweb overruling my session timeout on each page load?

Hope you got some ideas

Regards
Christoffer Andersen


Replies

 
Nicolai Høeg Pedersen
Reply
Sessions can die for many many reasons and should not be counted on - this is not a behavior of Dynamicweb, but IIS/Browsers.

If you need to rely on more specific login times, you have to use cookies. Set a timestamp in the cookie and use it to determine if the user should be logged in or not.

 

You must be logged in to post in the forum