I have two user types for login,Admin and other user. Idle auto logout for Admin should be 2 hrs(120 min), for other user it should be 15 Min.
For admin user after being idle for more than 20 minutes,application leads to auto logout to login page.
As per my requirement auto logout for admin should be 2hrs.
Early session time out happening for admin user , this issue occurs only in Live environment.
What I have tried:
I used 2 variables inside web config file,
web.config
<pre><appSettings>
<add key="AdminUser" value ="120"/>
<add key="OtherUser" value ="15"/>
</appSettings>
<authentication mode="Forms">
<forms defaultUrl="~/default.aspx" loginUrl="~/login.aspx" slidingExpiration="true" timeout="2880"/>
</authentication>
<sessionState timeout="10800" />
Used two variables in Master page Load event after user successful login.
Main.master.cs
if(LoggedInUser=="Admin")
{
Session.Timeout = Convert.ToInt32(ConfigurationManager.AppSettings.Get("AdminUser"));
}
else
{
Session.Timeout = Convert.ToInt32(ConfigurationManager.AppSettings.Get("OtherUser"));
}
Commented timeout values from Form tag and session state tag.
Also presumes IIS overriding config values and modified IIS session values to 120 min and checked, but Issue remains same in Live environment. Kindly suggest a solution, Thanks in advance