HTTP Modules and Handlers Explained

ASP.NET Applications allow you to register ASP.NET Modules and Handlers that get executed as part of every HTTP Request handled by ASP.NET. These modules and handlers can be used to handle things like Authentication, URL Rewriting, Logging, ... for every ASP.NET Page Request. Applications based on ASP.NET MVC for instance leverage this option.

Looking at an application like DotNetNuke - Open Source CMS - we can see a long list of handlers and modules that get registered in web.config and therefore executed for every ASP.NET request:

Modules can also be registered in IIS and will then be executed as part of the Page Request. So - also check Module configurations in IIS to find out whether your applicaton makes use of HTTP Modules.

How-To get visibilty into Modules and Handlers

As these modules and handlers get executed outside the default ASP.NET Page processing we have to enable visibilty into these modules and handlers in our dynaTrace ASP.NET Sensor. You need to enable the setting "Enable ASP.NET MVC Support" as shown in the following screenshot:

Now our ASP.NET PurePaths contain executions of our ASP.NET Http Handlers and Modules allowing us to identify performance problems in these handlers or capture information from these handlers to be used with Business Transactions, e.g: authenticated username

Icon

Tip: When you want to see every Handler and Module you can define a custom sensor for IHttpModule and IHttpHandler. By default dynaTrace's Auto Sensors will only show you those modules and handlers that have a performance impact

When do enable this setting?

"Enable ASP.NET MVC Support" should be enabled for ASP.NET Applications that make heavy use of ASP.NET Modules and Handlers. Applications based on ASP.NET MVC should always enable this option - hence the name. I recommend enabling this option for most ASP.NET Applications. If you don't see a value in it because you do not leverage Modules or Handlers you can disable.

Icon

As we see more ASP.NET Apps using critical Modules/Handlers it is likely that this option will be on by default in upcoming version of dynaTrace (> 4.1)

Tip: Capturing Session Attributes

If you need to capture session attributes you also want to enable the option "Capture details in all filters and pages". As session attributes are not available until ASP.NET calls the first Handler/Module dynaTrace won't be able to capture this information on the root node of the PurePath. With this option on we make sure to capture it on those ASP.NET Nodes where this information is available.

More information on ASP.NET HTTP Modules and Handlers

In case you want to learn more about Handlers and Modules check out the following blog posts:


Selected Topics

Not Logged In? Customers and AJAX Edition Users Login with your Community Account