I'm tired of installing MiniProfiler using HowTo at http://miniprofiler.com/
It works:
<%= StackExchange.Profiling.MiniProfiler.RenderIncludes() %>
But when I start the site, I get this error message:
'MiniProfiler' is undefined
The problem is the included MiniProfiler code:
var initMp = function(){ load('/mini-profiler-resources/includes.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE=',function(){ MiniProfiler.init({.....
When I try to open http://localhost/mini-profiler-resources/includes.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE=
with IE, I get 404.
I even tried this solution https://stackoverflow.com/a/4646251/2126321 , but it did not work for me :(
Does anyone know this problem or know what I can do to fix this?
Decision
I solved the problem by adding the configuration section from this solution and the line "runAllManagedModulesForAllRequests":
<system.webServer> <modules runAllManagedModulesForAllRequests="true"/> <handlers> <add name="UrlRoutingModule1" path="mini-profiler*.js" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" /> <add name="UrlRoutingModule2" path="mini-profiler*.css" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" /> <add name="UrlRoutingModule3" path="mini-profiler*.tmpl" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" /> </handlers> </system.webServer>
The "trick" was to add the line below to make the handlers work.
<modules runAllManagedModulesForAllRequests="true"/>
source share