www.webdeveloper.com
Results 1 to 5 of 5

Thread: FormsAuthentication.SignOut(); not working

  1. #1
    Join Date
    Jan 2007
    Posts
    34

    FormsAuthentication.SignOut(); not working

    hi friends,
    I am using role based form authentication,FormAuthentication .SignOut is not properly working I have given it in the User management page .After that I gave redirect to home page .code is being excecuted but not serving the purpose.If I click back it is directly showing the user pages without Authentication,Any body have some solution

    private void signOut_Click(object sender, System.EventArgs e)
    {
    FormsAuthentication.SignOut();
    Session.Clear();
    Response.Redirect("home.aspx",true);

    }

  2. #2
    Join Date
    Apr 2005
    Posts
    634
    try use the loginview control, it will save you a lot of code and it works out of the box.
    "Java is great, PHP sucks and .NET can't scale" - Shaun Connoly, JBoss's vice president of product development. April 5, 2006

  3. #3
    Join Date
    Jan 2007
    Posts
    34
    Cannot use login control as working with Asp1.0.I think Login control comes in Asp2.0

  4. #4
    Join Date
    Jan 2007
    Posts
    34
    Is there any Javascript code to delete history of visited pages.

  5. #5
    Join Date
    Apr 2005
    Posts
    634
    all form.authentication.signout does is release the user session from server memory. it is not going to prevent user from going back to the history pages (assuming history has cached in the browser).

    there are few days to handle it, you can:
    1) have javascript to manipulate page history by pointing the history to a signoff page
    Code:
     location.replace('logout.aspx')
    or
    2) sign SSL (like online banking) and make sure history won't get cache.
    "Java is great, PHP sucks and .NET can't scale" - Shaun Connoly, JBoss's vice president of product development. April 5, 2006

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles