0
MVC5에서 ASP.NET ID를 사용하고 있으며 일정 기간이 지나면 로그인 한 사용자를 만료시키기를 원합니다. 난의 Web.config의 경우 System.Web 섹션을 추가했습니다 :MVC5의 인증 시간 초과
var authenticationManager = HttpContext.GetOwinContext().Authentication;
authenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
var identity = await _userManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
authenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = false }, identity);
그러나 사용자가 기록되지 않습니다 : 나는 또한 영구 쿠키를 사용하지 않는 로그인 코드를 변경 한
<authentication mode="Forms">
<forms timeout="1" slidingExpiration="false"/>
</authentication>
밖으로 나가면, 그들은 영원히 계속 로그인 할 수 있습니다.