If I am seting Session Timeout like less then 20 mins everything is working fine.
But if it is > 20 mins it doesnt work. It happens with VS 2013 and Production IIS.
Here is a code I have use.
How to fix that issue? Thank you!
STARTUP.AUTH
public partial class Startup
{
public void ConfigureAuth(IAppBuilder app)
{
var sessionTimeout = 5;
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
ExpireTimeSpan = TimeSpan.FromMinutes(sessionTimeout),
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login")
});
}
GLOBAL.ASAX
protected void Session_Start(object sender, EventArgs e)
{
Session.Timeout = 5;
}
P.S. WEB.CONFIG
<sessionState mode="InProc" />
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" defaultUrl="~/Account/Login" name="MyApp123" />
</authentication>