FormsAuthentication.SignOut() and Firefox

  • Thread starter Thread starter rdlauer
  • Start date Start date
R

rdlauer

When executing FormsAuthentication.SignOut() on IE, works fine, removes
FormsAuth cookie. When using Firefox, though, the cookie remains and
user does not get signed out. Has anyone seen this happen? Here is the
code that I'm using (this is an ASP.NET 2.0 app):

set the cookie:

Dim ticket As New FormsAuthenticationTicket(1, "somestring",
DateTime.Now(), DateTime.Now.AddHours(2), False, "")
Dim encryptedTicket As String = FormsAuthentication.Encrypt(ticket)
Dim authenticationCookie As New
HttpCookie(FormsAuthentication.FormsCookieName, encryptedTicket)
Response.Cookies.Add(authenticationCookie)

log out page (located outside of protected "Admin" directory):

Session.Abandon()
FormsAuthentication.SignOut()

web.config:

<authentication mode="Forms">
<forms name="AuthAdmin" path="/Admin" loginUrl="Default.aspx"
protection="All" timeout="120" />
</authentication>

<authorization>
<allow users="*" />
</authorization>

<location path="Admin">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
 
Back
Top