How to obtain a reference to the default ASP.NET page handler or web-services handler?
问题 Consider a Web.config file containing the following httpHandlers declaration: <httpHandlers> <add verb="*" path="*" type="MyWebApp.TotalHandlerFactory"/> </httpHandlers> In other words, this handler factory wants to “see” all incoming requests so that it gets a chance to handle them. However, it does not necessarily want to actually handle all of them, only those that fulfill a certain run-time condition: public sealed class TotalHandlerFactory : IHttpHandlerFactory { public IHttpHandler