Windows authentication with Signout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,135
Latest member
VeronaShap
Top