Force re-logon with Windows authentication

J

Jonas

Hi!

I'm building an ASP.NET web application that needs an automatic logoff after
a specified time out period, forcing the user to enter his/her Windows
authentication credentials again. I use Windows authentication and IIS is
set to use Basic Authentication as this is going to be used in an
extranet/internet environment with IE as supported browser.

Can I from server code logoff a user from the Windows domain, or do I have
to implement some special kind of authentication scheme?

Brgds

Jonas
 
G

Guest

I have considered doing this, but never implemented it... First you will have
to keep the time the session started and an expiration timespan. I would save
these as session variables. Then compare DateTime.Now to startTime + timeSpan
on every postback... if > 0 then rediect to a page that does a
Session.Abandon; Response.Status = "401 Access Denied" as it's only output.
That should force a logon dialog with Basic set.

Chip Pettit
 

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,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top