Reputation:
I am working in a web application project using asp.net ,my problem is I want to increase my Session time out to 1 hour ,For that I have used in web.config file:
<sessionState timeout="60" cookieless="false" mode="InProc"/>
but it is not working.
The Particular Page automatically redirects to login page after a few minutes.Why it is happening so?
Upvotes: 0
Views: 1738
Reputation: 885
In web config file, change sessionstate timeout propety
<system.web>
<sessionState mode="InProc" cookieless="false" timeout="60"/>
</system.web>
Upvotes: 1
Reputation: 13146
It seems that client cookie is being expired and the IIS redirects user to login page to authenticate again. It is not relevant with sessionState
timeout. Try to set timeout of FormsAuthentication
;
<authentication mode="Forms">
<forms loginUrl="~/Account/LogIn" timeout="60" />
</authentication>
Upvotes: 1
Reputation: 187
If you want to set the timeout to 1 hour then use the following
<configuration>
<system.web>
<sessionState timeout="60"></sessionState>
</system.web>
</configuration>
Upvotes: 1