I use Asp Identity for Authentication in MVC project, my problem is the session end and the user still authentication in some cases.
I set the time out of OWIN to 20 min on configuration
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
ExpireTimeSpan = TimeSpan.FromMinutes(20),
SlidingExpiration = false,
})
its work after 20 min my session data and Owin is cleared.
but still problem in some cases :
when IIS reset the session clear but the user still authenticated .
when I build my solution on vs 2015 the session clear but the user still authenticated .