You can set the session time out of your application in web.config file.
<system.web>
<sessionState timeout="60" />
</system.web>
This will work your if application is on local computer but when you have hosted the application on IIS above setting will not be work as expected if you haven't set the idle time out in IIS. Default idle time out is 20 mins.
So if you are expecting the user to be redirected to the login page if the user is idle for 60 mins, with the above IIS setting user will be redirected to the login only after 20 mins.
Go to application pools in IIS -> Select the application pool -> Go to Advance Settings from right side pane -> Change the idle time out to 60 mins.
Thursday, December 6, 2012
Session Time out in ASP.NET and IIS
Subscribe to:
Post Comments (Atom)
No comments:
Write comments