Forms Authentication Expiration Problem
From: Edward Henn (henne@saccourt.com.no.spam)
Date: 03/28/03
- Next message: Cy Huckaba: "Re: Protect Non-ASP Files"
- Previous message: Cy Huckaba: "Re: session variables disappeared when recompiling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Edward Henn" <henne@saccourt.com.no.spam> Date: Fri, 28 Mar 2003 09:45:57 -0800
cross-posted from framework.aspnet...
My ASP.NET (test) application is using Role-Based Forms Authentication, and
it works fine until the authentication ticket expires. After expiration,
the user is not redirected to the login page again and the user can continue
to access any page in the app as long as they keep the browser session open.
Basically it acts like expriation for the session and/or ticket is set to
"never".
I used this MSDN article
http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetHT02.asp as an
example to create the app. As shown in this article, I am accessing Active
Directory to authenticate, then manually creating a FormsAuth ticket and a
GenericPrincipal object.
Here is the auth-related section of my web.config:
<authentication mode="Forms">
<forms loginUrl="Logon.aspx"
name="adAuthCookie"
timeout="1"
protection="All"
path="/">
</forms>
</authentication>
<authorization>
<deny users="?" /> <!-- Deny unauthenticated users -->
<allow users="*" /> <!-- Allow all authenticated users -->
</authorization>
Does anyone see a problem with this, or has anyone experienced something
similar? Or had success with a similar configuration?
What I have done in the meantime is modify Global.asax.vb's
Application_AuthenticateRequest event to check if the authTicket is Expired,
and if so, to set the ticket to Nothing to kill it. This forces the user to
the login page again. However I don't see any reference to having to do
this in the MSDN example or any other Forms Auth documentation, and it
doesn't seem like I should have to. Any thoughts, comments, questions?
Thanks
Ed
- Next message: Cy Huckaba: "Re: Protect Non-ASP Files"
- Previous message: Cy Huckaba: "Re: session variables disappeared when recompiling"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|