Discovering which handler is being used for request?

  • Thread starter Thread starter Jeff 'Jones' Putz
  • Start date Start date
J

Jeff 'Jones' Putz

Here's something kind of out there. I'm doing some "stuff" in
global.asax's Application_OnAcquireRequestState event. I have some
other non-traditional file extensions mapped to the asp.net process
(like .jpg to check that I'm not being bandwidth leeched). Is there an
easy way to see in Application_OnAcquireRequestState which class is
handling the request? In my case, I don't need to run the block of
code unless the request is being handled by
System.Web.UI.PageHandlerFactory.
 
Jeff 'Jones' Putz said:
Here's something kind of out there. I'm doing some "stuff" in
global.asax's Application_OnAcquireRequestState event. I have some
other non-traditional file extensions mapped to the asp.net process
(like .jpg to check that I'm not being bandwidth leeched). Is there an
easy way to see in Application_OnAcquireRequestState which class is
handling the request? In my case, I don't need to run the block of
code unless the request is being handled by
System.Web.UI.PageHandlerFactory.

You could look at Context.Handler.
 
Back
Top