EndRequest Event is not handled

S

Sherif ElMetainy

Hello

I want to handle the System.Web.HttpApplication.EndRequest event

i use the following code
System.Web.HttpContext.Current.ApplicationInstance.EndRequest += new
EventHandler(EndRequestHandler);
by EndRequestHandler method is never called.

I tried to make look around with ildasm for when the method that fires
EndRequest, but I got completely lost. MSDN documentation says the
CompleteRequest method causes EndRequest to be called, but I looked at its
IL code, it only sets a field _requestCompleted to true.

The Global.asax.cs method Application_EndRequest is getting called without a
problem. I debuged the application to see what method calls
Application_EndRequest, I looked at the call stack, but to my surprise,
there is only Application_EndRequest in the call stack, and below it is
<non-user code>. I also checked the cs compilation source for Global.asax
in the Temp ASP.NET files folder, still not clue.

I need to know wh is my EndReqeustHandler not being called, and how does the
process work? How is the Application_EndRequest is wired to the page event
chain.


Thanks a lot for reading and help

Best Regards

Sherif
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top