forms authentication automatic logout without timers?
From: Sam (anonymous_at_discussions.microsoft.com)
Date: 06/30/04
- Previous message: John: "listbox and sql stored procedure"
- In reply to: Danny: "forms authentication automatic logout without timers?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Jun 2004 08:37:55 -0700
In the Global.asax AuthorizeRequest event, you can add
code that will check if the user is authenticated and if
the current url is secure or not. Then, sign the user out
accordingly:
Private Sub Global_AuthorizeRequest(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
MyBase.AuthorizeRequest
If User.Identity.IsAuthenticated Then
If Not
HttpContext.Current.Request.IsSecureConnection Then
System.Web.Security.FormsAuthentication.SignOut()
End If
End If
End Sub
>-----Original Message-----
>Hello,
>
>I have a web application that uses forms authentication.
I have been asked to implement a feature that logs users
out automatically if they navigate to a page outside of
the secured portion of the web app. This request means
that cookie timeouts won't work, it needs to be an instant
thing - you leave the site -> the door gets locked on your
way out even if you haven't explicitly logged out
yourself.
>
>Does anyone know if this is possible?
>
>Regards,
>
>Danny
>.
>
- Previous message: John: "listbox and sql stored procedure"
- In reply to: Danny: "forms authentication automatic logout without timers?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|