PROBLEM IN LOGGING OUT USING SESSION

Ankit Singh

Total Post:341

Points:2389
Posted by  Ankit Singh
 756  View(s)
Ratings:
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.

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Problem in logging out using session

    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");

    }

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!