FormsAuthentication.SignOut() results inSystem.NullReferenceException

  • Thread starter Thread starter Alex Diaz
  • Start date Start date
A

Alex Diaz

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.
 
Back
Top