# How to use MiniProfiler with runAllManagedModulesForAllRequests set to false?

**URL:** <https://community.miniprofiler.com/t/how-to-use-miniprofiler-with-runallmanagedmodulesforallrequests-set-to-false/154>\
**Category:** uncategorized\
**Created:** [April 28, 2012, 3:46pm UTC](https://community.miniprofiler.com/t/how-to-use-miniprofiler-with-runallmanagedmodulesforallrequests-set-to-false/154 "2012-04-28T15:46:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Spicer](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/adam_spicer/32/492_2.png) [@Adam\_Spicer](https://community.miniprofiler.com/u/Adam_Spicer)\
**Post date:** [April 28, 2012, 3:46pm UTC](https://community.miniprofiler.com/t/how-to-use-miniprofiler-with-runallmanagedmodulesforallrequests-set-to-false/154/1 "2012-04-28T15:46:33Z")

</div>

We are using MiniProfiler in [ASP.NET](http://ASP.NET) 4 hosted in IIS 7.5. Our `web.config` is configured with `runAllManagedModulesForAllRequests=false` as we don’t want [ASP.NET](http://ASP.NET) to process every static file.

We started having trouble running MiniProfiler after upgrading to version 2. So I posted a question on [Stack Overflow](http://stackoverflow.com/q/10304611/498969).

[The answer was simple](http://stackoverflow.com/a/10363517/498969), you need to register the path MiniProfiler uses as a handler for the UrlRoutingModule.

```
<system.webServer>
  ...
  <handlers>
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
  </handlers>
</system.webServer>

```
