Last post Apr 19, 2013 12:36 AM by BrockAllen
Apr 18, 2013 01:45 AM|lakshmiprasanna|LINK
Would like to know wirth respect to ASP.NET page lifecycle and HTTP Handlers, if i have HTTP handler and in ProcessRequest if i use context.ApplicationInstance.CompleteRequest() , will Page Life cycle events will excute after this.
If it executes, how to stop executing these.
Apr 18, 2013 08:25 AM|BrockAllen|LINK
From the docs:
Causes ASP.NET to bypass all events and filtering in the HTTP pipeline chain of execution and directly execute the
Internally all this does is set a flag, so that once the IIS pipeline moves to the next step it will jump to the EndRequest step. So if you call this from within the Page lifecycle it looks as if that will continue processing the rest opf the page methods.
This is different behavior than Response.End() -- that API calls CompleteRequest() and throws an exception to prevent further processing.
Apr 19, 2013 12:13 AM|lakshmiprasanna|LINK
Thanks for replying.
As per my understanding, once HTTP Application starts processing, at first HttpModule events then HTTP Handler event and then ASP.NET Page life cycle events will fire.
So is that, in HTTPHandler ProcessRequest event, if we call CompleteRequest, the rest of the PageLie Cycle events will not be fired.
Apr 19, 2013 12:28 AM|lakshmiprasanna|LINK
Question might be irrelavant, i want to process .aspx extension files which are nothing but of ASP.NET files, as per the docuementaion related to HTTP Handlers, ProcessRequest method will return the code that produces the output for the handler.
so the rest of the Page life cycle events will not be fired.
Apr 19, 2013 12:36 AM|BrockAllen|LINK
Page lifecycle events are only fired if the http handler derives from System.Web.UI.Page base class.