FormsAuthentication.SignOut() results inSystem.NullReferenceException

Discussion in 'Microsoft ASP .NET' started by Alex Diaz, Aug 22, 2010.

  1. Alex Diaz

    Alex Diaz Guest

    Hi. I am getting a "System.NullReferenceException" when I call
    FormsAuthentication.SignOut() from Session_End method in global.asax.
    Code is as follow:

    void Session_End(object sender, EventArgs e)
    {

    FormsAuthentication.SignOut();
    this.Session["user"] = null;
    Response.Redirect("login.aspx");

    }

    Any ideas why this could be happening?
    Thanks.
     
    Alex Diaz, Aug 22, 2010
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Jeff Johnson

    FormsAuthentication.SignOut not working within subfolder

    Jeff Johnson, Aug 5, 2003, in forum: Microsoft ASP .NET
    Replies:
    5
    Views:
    702
    Jeff Johnson
    Aug 6, 2003
  2. Ali
    Replies:
    1
    Views:
    248
    Egbert Nierop \(MVP for IIS\)
    Jan 29, 2004
  3. xiko tripa

    Problems with FormsAuthentication.SignOut()

    xiko tripa, Mar 29, 2004, in forum: Microsoft ASP .NET
    Replies:
    4
    Views:
    931
    xiko tripa
    Mar 30, 2004
  4. Ed West

    FormsAuthentication.SignOut not working

    Ed West, Aug 23, 2004, in forum: Microsoft ASP .NET
    Replies:
    0
    Views:
    343
    Ed West
    Aug 23, 2004
  5. Guest
    Replies:
    1
    Views:
    1,012
    Guest
    Sep 28, 2004
  6. Matthias S.
    Replies:
    3
    Views:
    915
  7. Nitin

    formsauthentication.signout() problem

    Nitin, Mar 30, 2005, in forum: Microsoft ASP .NET
    Replies:
    2
    Views:
    489
    Nitin
    Mar 31, 2005
  8. Signout does not signout.

    , Apr 4, 2006, in forum: Microsoft ASP .NET
    Replies:
    2
    Views:
    248
Loading...