How to set Session Timeout in web.config

There are two way to set session timeout property in ASP.Net.

First Method : Edit the following in your web.config fle.

<configuration>
<system.web>
<sessionState mode="InProc" cookieless="true" timeout="60">
</
sessionState>
</system.web>
</configuration>

 

Second Method : Go to global.asax file and write the code below:.

void Session_Start(object sender, EventArgs e)
{
     Session.Timeout = 60;
}


Also please refer the suggessions @ https://www.codeproject.com/Questions/464873/Validation-of-viewstate-MAC-failed

Was this answer helpful? 0 Users Found This Useful (0 Votes)