M
Martin
Hi,
Since I went ASP.NET with my global.asa (making it a global.asax) the
application events are called just fine as well as the Session_OnStart event
but the Session_OnEnd event is not. What is wrong? My global.asax looks like
this:
<%@ Application src="app.cs" Inherits="mwte.App" %>
This is my code behind file (app.cs):
namespace mwte
{
using System;
using System.IO;
using System.Web;
using System.Xml;
using System.Web.SessionState;
public class App : System.Web.HttpApplication
{
public void SaveSessionInfo()
{
}
// application event handlers
protected void Application_OnStart(Object Sender, EventArgs e)
{
}
protected void Application_OnEnd(Object Sender, EventArgs e)
{
}
// other application event handlers left out for brevity
// session event handlers
protected void Session_Start(Object sender, EventArgs e)
{
}
protected void Session_End(Object sender, EventArgs e)
{
}
}
}
The documentation says that for the End event to occur, session state mode
must be InProc. It should be, in my web.config it says:
<configuration>
<system.web>
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI"
cookieless="false" timeout="20" />
</system.web>
</configuration>
Any insightswould be appreciated.
Martin.
Since I went ASP.NET with my global.asa (making it a global.asax) the
application events are called just fine as well as the Session_OnStart event
but the Session_OnEnd event is not. What is wrong? My global.asax looks like
this:
<%@ Application src="app.cs" Inherits="mwte.App" %>
This is my code behind file (app.cs):
namespace mwte
{
using System;
using System.IO;
using System.Web;
using System.Xml;
using System.Web.SessionState;
public class App : System.Web.HttpApplication
{
public void SaveSessionInfo()
{
}
// application event handlers
protected void Application_OnStart(Object Sender, EventArgs e)
{
}
protected void Application_OnEnd(Object Sender, EventArgs e)
{
}
// other application event handlers left out for brevity
// session event handlers
protected void Session_Start(Object sender, EventArgs e)
{
}
protected void Session_End(Object sender, EventArgs e)
{
}
}
}
The documentation says that for the End event to occur, session state mode
must be InProc. It should be, in my web.config it says:
<configuration>
<system.web>
<sessionState mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424" stateNetworkTimeout="10"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI"
cookieless="false" timeout="20" />
</system.web>
</configuration>
Any insightswould be appreciated.
Martin.