Answer the question
In order to leave comments, you need to log in
BeginRequest not firing on Integrated Pipeline?
Everywhere on MSDN it is written that handlers need to be hung up in Init, which I do.
But at the same time, the BeginRequest handler does not work.
public void Init(HttpApplication context)
{
this.context = context;
this.context.BeginRequest += new EventHandler(context_BeginRequest);
this.context.EndRequest += new EventHandler(context_EndRequest);
}
void context_BeginRequest(object sender, EventArgs e)
{
context.Context.Items[ItemsKey] = CreateSession();
}
void context_EndRequest(object sender, EventArgs e)
{
ISession session = GetSession();
session.Flush();
session.Close();
ClearSession();
}
Registered as follows:
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="SimpleSessionHandler" type="Project.HttpModules.SessionHandlerModule, Project.SimpleSessionHandler" preCondition="managedHandler"/>
</modules>
. ..
In dev. server and classic pipeline works without problems.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question