Here is a quick tips to get the list of all active HTTPModules at runtime. We can get the list of all HttpModules from the web.config or from machine.config 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 HttpApplication and HttpModuleCollection Class. If we quickly recall the IIS Process Request [One detailed Article], 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 HttpRuntime load an HttpApplication object with the help of HttpApplicationFactory class. Each and every request should pass through the corresponding HTTPModule 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.
//Get Application Instance from Current Content
HttpApplication httpApps = HttpContext.Current.ApplicationInstance;
//Get List of modules in module collections
HttpModuleCollection httpModuleCollections = httpApps.Modules;
Response.Write("Total Number Active HttpModule : " + httpModuleCollections.Count.ToString() + "
");
Response.Write("List of Active Modules" + "
");
foreach (string activeModule inttpModuleCollections.AllKeys)
{
Response.Write(activeModule + "
");
}
skip to main |
skip to sidebar
RSS Feeds
Abhijit's World of .NET Blog
Wednesday, June 9, 2010
Wednesday, June 2, 2010
“CompressionEnabled” Session in ASP.NET 4.0
ASP.NET 4.0 comes us with a new option for compressing the Session data with Out Process Session mode. To enabling this functionality we need to add “compressionEnabled=”true” attribute with the SessionMode in web.config..
Here is the complete blog post...
CompressionEnabled” Session in ASP.NET 4.0
Here is the complete blog post...
CompressionEnabled” Session in ASP.NET 4.0
Labels
- .NET (1)
- .NET 4.0 (10)
- ASP.Net (2)
- ASP.NET (12)
- asp.net 4.0 (2)
- ASP.NET 4.0 (1)
- Awards (2)
- C# (8)
- C# 4.0 (3)
- code (1)
- codeproject (5)
- Debugging (2)
- Enterprise Library 4.1 (1)
- General (21)
- IIS (1)
- IntelliTrace (2)
- Microsoft ASP.NET Web Site (4)
- MSDN (1)
- Multithreaded Debugging (1)
- MVC (1)
- MVC Framework (1)
- MVP (3)
- My Articles (15)
- Parallel Debugging (1)
- RenderingMode (1)
- SQL Server 2005 (6)
- VideoTutorial (1)
- View State (1)
- Visual Studio 2010 (9)
- VS 2010 (1)
- VSX (1)
- Web Services (1)
- WPF (1)
ASP.NET Books
Copyright 2009
Abhijit's Blog. Powered by Blogger
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5
Blogger Showcase - Submit Your Blog Blogger Templates created by Deluxe Templates
Wordpress theme by Site5