S
Savin Igor
What can be done in Session_End()?
Can I get something from Session[] in this handler?
My Global.asax.cs is below
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
namespace SD
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
protected void Application_Start(Object sender, EventArgs e)
{
}
protected void Session_Start(Object sender, EventArgs e)
{
HttpContext.Current.Session["QWERTY"] = 9;
}
protected void Application_BeginRequest(Object sender, EventArgs
e)
{
}
protected void Application_EndRequest(Object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(Object sender,
EventArgs e)
{
}
protected void Application_Error(Object sender, EventArgs e)
{
int i = 0;
}
protected void Session_End(Object sender, EventArgs e)
{
int i = (int)HttpContext.Current.Session["QWERTY"];
i++;
}
protected void Application_End(Object sender, EventArgs e)
{
}
}
}
When Session_End() is raised HttpContext.Current.Session gives me
NullReferenceException. I have no other plkaces where my
session-hosted var can be modified. Developing platform - VS2003 +
W2000 Server SP3
Can I get something from Session[] in this handler?
My Global.asax.cs is below
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
namespace SD
{
/// <summary>
/// Summary description for Global.
/// </summary>
public class Global : System.Web.HttpApplication
{
protected void Application_Start(Object sender, EventArgs e)
{
}
protected void Session_Start(Object sender, EventArgs e)
{
HttpContext.Current.Session["QWERTY"] = 9;
}
protected void Application_BeginRequest(Object sender, EventArgs
e)
{
}
protected void Application_EndRequest(Object sender, EventArgs e)
{
}
protected void Application_AuthenticateRequest(Object sender,
EventArgs e)
{
}
protected void Application_Error(Object sender, EventArgs e)
{
int i = 0;
}
protected void Session_End(Object sender, EventArgs e)
{
int i = (int)HttpContext.Current.Session["QWERTY"];
i++;
}
protected void Application_End(Object sender, EventArgs e)
{
}
}
}
When Session_End() is raised HttpContext.Current.Session gives me
NullReferenceException. I have no other plkaces where my
session-hosted var can be modified. Developing platform - VS2003 +
W2000 Server SP3