이 web.config와 같이 ASP.NET에서 Windows 인증을 사용할 때 어떻게 로그 아웃합니까?ASP.NET Windows 인증 로그 아웃
<authentication mode="Windows" />
이미 다음을 시도한 바 있습니다. 리디렉션되지만 사용자는 로그 아웃하지 않습니다.
void logoutButton_Click(object sender, EventArgs e) {
HttpContext.Current.Session.Clear();
HttpContext.Current.Session.Abandon();
ViewState.Clear();
FormsAuthentication.SignOut();
Response.Redirect("/");
}
배경 정보 :
내가 로컬 파일에 액세스하는 Active Directory를 사용하여 신원을 가장 할 필요가 있기 때문에 Windows 인증을 사용해야합니다. 그리고 HttpContext.Current.User.Identity
은 WindowsIdentity
이 아니기 때문에 양식 인증을 사용하여 가장 할 수 없습니다. Impersonate using Forms Authentication
결국 폼 인증을 통해 사용자를 가장하는 것처럼 보입니다. http://stackoverflow.com/a/11873754/359765 – bgh