Home > DeveloperSection > Forums > Problem in logging out using session
Ankit Singh

Total Post:341

Points:2389
Posted on    November-20-2014 10:26 PM

 ASP.Net ASP.Net  Session 
Ratings:


 1 Reply(s)
 481  View(s)
Rate this:

I am having problem in session management in my asp.net. I am logging out of the admin and user account, but as i am pressing the forward button of the browser, the page is redirected again to the User/Admin account. I already destroyed the session i created for storing the username, everytime i am clicking the log out button.



Sumit Kesarwani

Total Post:378

Points:2694
Posted on    November-20-2014 11:42 PM

Hi Ankit, 

If you are using the default template of Visual Studio this may help you:

 

if(!HttpContext.Current.User.Identity.IsAuthenticated)

{

    Response.Redirect("~/Login.aspx");

}


Don't want to miss updates? Please click the below button!

Follow MindStick