I have a problem with the login of a web page that I am working. when I log in the page, I save the information in the HttpRequest
and HttpSessionState
. But when I logoff and I create a new user for the page, this information is still stored in these parameters.
How I can close a httpRequest
and a HttpSessionState
?
Asked
Active
Viewed 115 times
0

VVN
- 1,607
- 2
- 16
- 25

Jorge Filipe Pinto
- 65
- 1
- 8
2 Answers
0
You can close a HttpSessionState using the following:
And here is another stack question regarding the httpRequest
-
Thanks for your help. The clean method worked . But I don't understand something in the HttpRequest . HttpRequest is the same as the HttpWebRequest? – Jorge Filipe Pinto Mar 07 '16 at 14:48
0
Are you using Web Forms? What Authentication method are you using? Typically, in Web Forms, in the event handler for the Logout button, you would sign-out from Forms Authentication and the Session.
Session.RemoveAll();
FormsAuthentication.SignOut();
FormsAuthentication.RedirectToLoginPage();

Tamayi
- 143
- 4
-
Yes, I use the Form Autentication and I didn´t have insert the Session.RemoveAll(). But the Clean method also works. Thanks for yours help. – Jorge Filipe Pinto Mar 07 '16 at 14:44