Signout does not signout.

C

craigkenisston

So, I have this code : (AspNet 1.1)

FormsAuthenticationTicket authTkt = new FormsAuthenticationTicket(1,
_username,
DateTime.Now,
DateTime.Now.AddMinutes(60),
true,
userdata);

string encTicket = FormsAuthentication.Encrypt(authTkt);
HttpCookie authCookie = new
HttpCookie(FormsAuthentication.FormsCookieName, encTicket);
// authCookie.Domain = "mysite.com";
// authCookie.Path = "/";
Response.Cookies.Add(authCookie);

When I call FormsAuthentication.SignOut(); it does work.
However, since I use subdomains I have to use the commented lines
..Domain and .Path, in order to the cookie work site wide. So, I
uncomment those lines and run my sample again. Now I click the logout
button in my site, which calls formsAuthentication.SignOut, but it does
not signout ! The user still authenticated !
What's happening here ? I have no idea.
 
C

craigkenisston

It seems that simply, the cookie is not being removed.
So, the question is, why the cookie is not being deleted?
 

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

No members online now.

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,709
Latest member
AustinMudi

Latest Threads

Top