I tired to install the MiniProfiler, using the HowTo on http://miniprofiler.com/
This seems to work:
<%= StackExchange.Profiling.MiniProfiler.RenderIncludes() %>
But when I start the site, I get this error message:
'MiniProfiler' is undefined
The problem is in the included MiniProfiler code:
var initMp = function(){
load('/mini-profiler-resources/includes.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE=',function(){
MiniProfiler.init({.....
When I try open http://localhost/mini-profiler-resources/includes.js?v=6cJT7lsVkH6SxAlFpQstk1/AgtUwMUApXN3pviVvaRE=
with IE I get an 404.
I even tried this Solution found on stackoverflow but it did not work for me :(
Does anybody know this problem, or know what I can do to fix that?
I solved the problem by adding the config section from this solution and the "runAllManagedModulesForAllRequests" line:
<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 get the handlers to work.
<modules runAllManagedModulesForAllRequests="true"/>
You should be able to avoid this issue a bit more concisely (one handler line instead of three) by adding the following to your main web.config
file:
<system.webServer>
...
<handlers>
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
</handlers>
</system.webServer>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With