Click to See Complete Forum and Search --> : Logout not working in asp


imtheuser
11-06-2006, 07:32 AM
[FONT=Comic Sans MS][SIZE=4][COLOR=RoyalBlue] Hi all,

I have a web application.
I need to end the application session and database connections on click of a logout button.The logout button is on a header page common to the entire application, and is currently ending only the current session by destroying the session cookie.
I am new to asp ...please help me...

Thanking you in anticipation.

veljkoz
11-06-2006, 03:06 PM
I'm not sure what you are trying to do - log out the user?
Application session is not about the user so I guess I you want to end the user session? Did you try .Clear() method ? (e.g. Session.Clear() ).

If you're using Forms authentication (in you web.config file), you can log out the user by calling FormsAuthentication.SignOut(); (and when you're logging them in call FormsAuthentication.SetAuthCookie(userName,true);)

If you provide more details about what are you trying to do, and what you have tried so far you could get more detailed answer.

Hope this helps a bit anyway...

russell
11-06-2006, 04:33 PM
Session.Abandon

so_is_this
11-06-2006, 04:39 PM
Session.Abandon
Under what conditions would that not work?

http://www.webdeveloper.com/forum/showthread.php?t=127127