Get registered HttpHandlers at Web.Config from HttpContext

Is there a way to get the types of registered IHttpHandler from the current HttpContext or web.config?

I am trying to check if my HttpHandler in the web.config file from WebControl .

+7
source share
1 answer

You can get the list of registered HttpHandler from web.config as follows:

 using System.Configuration; using System.Web.Configuration; Configuration cfg = WebConfigurationManager.OpenWebConfiguration("/"); HttpHandlersSection hdlrs = (HttpHandlersSection)cfg.GetSection("system.web/httpHandlers"); 
+5
source

All Articles