FormsAuthentication.SignOut() results inSystem.NullReferenceException

Discussion in '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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff Johnson
    Replies:
    6
    Views:
    3,740
    tharadk
    Jul 24, 2009
  2. Ali
    Replies:
    1
    Views:
    334
    Egbert Nierop \(MVP for IIS\)
    Jan 29, 2004
  3. Ed West
    Replies:
    0
    Views:
    367
    Ed West
    Aug 23, 2004
  4. =?Utf-8?B?TWFydGluIExlZQ==?=

    Calling FormsAuthentication.SignOut() after calling Response.Flush

    =?Utf-8?B?TWFydGluIExlZQ==?=, Sep 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    719
    =?Utf-8?B?RXRoZW0gQXp1bg==?=
    Sep 28, 2004
  5. Signout does not signout.

    , Apr 4, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    459
Loading...

Share This Page