How can you see the collection of registered httphandlers?

How do you see which HttpHandlers are registered? How can you get through registered HttpHandlers? I believe that all the handlers are in the collection somewhere, and where.

+5
source share
2 answers
using System.Configuration;
using System.Web.Configuration;

Configuration cfg = WebConfigurationManager.OpenWebConfiguration("/");
HttpHandlersSection hdlrs = (HttpHandlersSection)cfg.GetSection("system.web/httpHandlers");

just copied from here: Get registered HttpHandlers in Web.Config from HttpContext

0
source

In a web application, you can get a single line section using the ConfigurationManager.

HttpHandlersSection httpHandlers = (HttpHandlersSection)ConfigurationManager.GetSection("system.web/httpHandlers");
0
source

All Articles