T
Thomas Due
I have a web application which uses Windows Authentication for user
authorization.
I would like to give the user a way of logging out, instead of just
closing the browser. Basically I want a Signout option, as used with
Forms Authentication and FormsAuthentication.Signout();
But how would I do that?
I have attempted the following:
GenericIdentity ident = new GenericIdentity("", "");
GenericPrincipal prin = new GenericPrincipal(ident, new string[]{});
HttpContext.Current.User = prin;
Session.Abandon();
Response.Cookies["ASP.NET_SessionID"].Value = null;
Response.Redirect("default.aspx");
Without luck.
What am I doing wrong?
Is what I want possible?
If yes, how?
--
Thomas Due
Posted with XanaNews version 1.16.4.6
"Supreme excellence consists in breaking the enemy's resistance without
fighting."
-- Sun-Tzu
authorization.
I would like to give the user a way of logging out, instead of just
closing the browser. Basically I want a Signout option, as used with
Forms Authentication and FormsAuthentication.Signout();
But how would I do that?
I have attempted the following:
GenericIdentity ident = new GenericIdentity("", "");
GenericPrincipal prin = new GenericPrincipal(ident, new string[]{});
HttpContext.Current.User = prin;
Session.Abandon();
Response.Cookies["ASP.NET_SessionID"].Value = null;
Response.Redirect("default.aspx");
Without luck.
What am I doing wrong?
Is what I want possible?
If yes, how?
--
Thomas Due
Posted with XanaNews version 1.16.4.6
"Supreme excellence consists in breaking the enemy's resistance without
fighting."
-- Sun-Tzu