Last post Apr 27, 2011 01:03 AM by compuboy
Apr 27, 2011 01:03 AM|compuboy|LINK
My question is regarding an issue I've recently discovered while using some
HttpApplication events. As you may know, there are two events named
PreRequestHandlerExecute and PostRequestHandlerExecute
on HttpApplication which, as stated in the official documents, are supposed to be called just before and after execution of an event handler (for example, a page or an XML Web service). I have consumed these two events in my web application
and they are successfully fired in almost every type of request (e.g. post-backs, ASMX Web services, webresource.axd, and even static content requests) but if I define a page method in my ASP.NET page (I mean web services that are defined in my page's code-behind
and are called in JS via PageMethods.[MethodName]() syntax), these two events are not fired when I call it. Note that all the other events in HttpApplication (such as
BeginRequest, EndRequest, etc.) are fired as expected. My only problem is with these two events.
I have searched every reference in hand to find a reason or piece of documentation for this behavior and whether it is by-design or considered a bug but unfortunately without any success. I tested the scenario on ASP.NET 4 on Windows XP with IIS 5.1 and
Windows 7 with IIS 7.5 all showing the same [strange] behavior.
I would be grateful if anyone helps me with this issue.
Sorry if this question might be a little off-subject. I couldn't find a better forum category to ask my question in.
Update: just discovered the same issue with PostAcquireRequestState event.