I\'ve been searching for an answer to this for a while but the problem seems quite complex and I\'m struggling to find an answer.
I\'m a beginner software developer
Problem is now Solved.
For anyone with the same problem, the issue is caused by a bug called 'katana bug #197'.
The easiest fix is to download 'kentor.OwinCookieSaver' NuGet Package. and add app.UseKentorOwinCookieSaver(); above your Application cookie config in startup.
https://github.com/KentorIT/owin-cookie-saver
// kentor.OwinCookieSaver for 'katana bug #197' (login cookies being destroyed on logout!)
app.UseKentorOwinCookieSaver();
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
CookieName="LoginCookie",
LoginPath = new PathString("/Login/Login"),
Provider = new CookieAuthenticationProvider
{
OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
validateInterval: TimeSpan.FromMinutes(30),
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
}
});
Microsoft are aware of the issue and it will be resolved in 2015.