473,385 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

FormsAuthentication.SignOut() not working

Hi ALl,

I had problem with FormsAuthentication.SignOut(). It wasnt working.

Looked arround and saw a lot of posts and different solutions to the
problem.

And some how (i dont nkow what fixed it) i got it working.

The following code changes that i made did NOT help.

1)Response.Cookies[FormsAuthentication.FormsCookieName].Value = "Crap"
or expires=DateTime.now

2) Response.Cache.SetCacheability(HttpCacheability.No Cache);

This is what worked for me.

Right now I have just one line

System.Web.Security.FormsAuthentication.SignOut();

and this is my web.config
<forms loginUrl="index.aspx" path="/" defaultUrl="MyPage.aspx"
cookieless="UseCookies"/>

I had to change my web.config to get it working.

Hope this will help somebody.

Oct 30 '06 #1
2 5267
Well FormsAuthentication.SignOut(); could have done all that for u.
But the next question is when u click the back button on ur browser do u get
to see
the previous page?
PAtrick\

"parez" <ps*****@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi ALl,

I had problem with FormsAuthentication.SignOut(). It wasnt working.

Looked arround and saw a lot of posts and different solutions to the
problem.

And some how (i dont nkow what fixed it) i got it working.

The following code changes that i made did NOT help.

1)Response.Cookies[FormsAuthentication.FormsCookieName].Value = "Crap"
or expires=DateTime.now

2) Response.Cache.SetCacheability(HttpCacheability.No Cache);

This is what worked for me.

Right now I have just one line

System.Web.Security.FormsAuthentication.SignOut();

and this is my web.config
<forms loginUrl="index.aspx" path="/" defaultUrl="MyPage.aspx"
cookieless="UseCookies"/>

I had to change my web.config to get it working.

Hope this will help somebody.

Oct 31 '06 #2
SignOut did not work for me.

ANd now its not working any more..
Patrick.O.Ige wrote:
Well FormsAuthentication.SignOut(); could have done all that for u.
But the next question is when u click the back button on ur browser do u get
to see
the previous page?
PAtrick\

"parez" <ps*****@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi ALl,

I had problem with FormsAuthentication.SignOut(). It wasnt working.

Looked arround and saw a lot of posts and different solutions to the
problem.

And some how (i dont nkow what fixed it) i got it working.

The following code changes that i made did NOT help.

1)Response.Cookies[FormsAuthentication.FormsCookieName].Value = "Crap"
or expires=DateTime.now

2) Response.Cache.SetCacheability(HttpCacheability.No Cache);

This is what worked for me.

Right now I have just one line

System.Web.Security.FormsAuthentication.SignOut();

and this is my web.config
<forms loginUrl="index.aspx" path="/" defaultUrl="MyPage.aspx"
cookieless="UseCookies"/>

I had to change my web.config to get it working.

Hope this will help somebody.
Nov 16 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Jeff Johnson | last post by:
I'm using forms authentication to protect a subfolder within my site. I've got it working fine except for two issues: (1) When I do a RedirectFromLogin page I have to put a cookie path ("/"...
0
by: Ed West | last post by:
Hello This SignOut code is not working, any ideas? TIA. public class logout : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { FormsAuthentication.SignOut();...
1
by: Martin Lee | last post by:
I know that this is something of an old chestnut. Nevertheless, my problem is as follows; I have a page in which I write html out to the client using Response.Write(), followed by...
4
by: Matthias S. | last post by:
Hi there, I've created an application which is using Forms-based authentification. My Login-Button event handler looks somewhat like this: // validate the input, etc... // sUserName holds now...
2
by: Nitin | last post by:
Hi, I login to my asp.net web application from the same client machine twice, using different credentials. Both separate instances work fine, independant of each other. However, when I logout...
9
by: Patrick Olurotimi Ige | last post by:
When i add the following code below to a userControl it doesn't fire. Any ideas? Sub SignOut(ByVal objSender As Object, ByVal objArgs As EventArgs) FormsAuthentication.SignOut()...
3
by: Mark Olbert | last post by:
FormsAuthentication.SignOut() removes the authorization ticket from a user (and the user's roles), but does not change the user's identity. I need to be able to either revert the user to the...
0
by: Jon Paal | last post by:
FormsAuthentication.SignOut() not working, after executing the command pages are still accessible ???? how can I force the signout to kill the login ?
3
by: c83 | last post by:
Hi everyone!! I have a litle problem with an ASP.net application. My default.aspx page can be accessed only by the registered users. after user signs-out, it is transfered to the login.aspx...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.