Here is a quick tips to get the list of all active
at runtime. We can get the list of all
file. But, what we need to do if we want to get the list of all active HttpModules during runtime? Yes. We can easily get the details with the help of
Class. If we quickly recall the IIS Process Request, when a request reaches to worker Process from client browser, First of all Worker process is responsible to start and HttpRuntime by loading ISAPI filter. After that
object with the help of
class. Each and every request should pass through the corresponding
to reach to HTTPHandler, this list of module are configured by the HTTPApplication. Below is the code snippet by which we can get the list of active HttpModules.
HttpApplication httpApps = HttpContext.Current.ApplicationInstance;
HttpModuleCollection httpModuleCollections = httpApps.Modules;
Response.Write("Total Number Active HttpModule : " + httpModuleCollections.Count.ToString() + "</br>");
Response.Write("<b>List of Active Modules</b>" + "</br>");
foreach (string activeModule in httpModuleCollections.AllKeys)
Response.Write(activeModule + "</br>");
Below is the sample output :
This can be quite useful when we want to check if our custom created module loaded successfully or not .