Forms Authentication and cached pages
Lizet Pena de Sola <[email protected]>
| Newsgroups | gmane.comp.windows.devel.dotnet.web |
|---|---|
| Message-ID | <F1F55D2665F3E54995471CE881E332D903BD61B0@crplivexc55.citnet.cit.com> |
Hi all,
I'm reviewing a web project that uses Forms authentication.
After the authentication process we create an encrypted ticket, create
the cookie that will be used by the FormsAuthentication provider and
redirect to the requested page:
Dim isCookiePersistent As Boolean = False
Dim authTicket As New FormsAuthenticationTicket(1, UserName,
DateTime.Now, DateTime.Now.AddMinutes(60), isCookiePersistent, UserData)
Dim encryptedTicket As String =
FormsAuthentication.Encrypt(authTicket)
Dim authCookie As New
HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket)
If (isCookiePersistent) Then
authCookie.Expires = authTicket.Expiration
End If
Context.Response.Cookies.Add(authCookie)
FormsAuthentication.RedirectFromLoginPage(UserName, False)
During user log out we clear the session, call the
FormsAuthentication.SignOut() and redirect the user to the login page.
We have, however, an odd behavior. After the user has logged out of the
application, he can, by clicking the back button on the same browser
windows, navigate to the previous pages he opened. These pages are in
the secure area. These pages are not requested to the server, these
requests do not hit the server so I presume the user sees cached pages
in the client.
Any suggestion on how to avoid this is more than welcome,
Lizet
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com