Mvc Mini Profiler requests for files with and without RouteBasePath
Asked Answered
W

2

13

This is driving me crazy, I'm testing my app with both Firefox and IE, on Firefox works just fine, but on IE mini profiling is making these 5 requests

/Content/mvc-mini-profiler/mini-profiler-includes.css?v=1.9.0.0

/Content/mvc-mini-profiler/mini-profiler-includes.js?v=1.9.0.0

/Content/mvc-mini-profiler/mini-profiler-jquery.tmpl.beta1.js

/mini-profiler-includes.css?v=1.9.0.0

/mini-profiler-includes.js?v=1.9.0.0

I put the RouteBasePath to be ~/Content/mvc-mini-profiler but for some reason is also making requests without it.

Am I doing something wrong or is this some kind of bug?

Thanks.

Wendalyn answered 28/3, 2012 at 18:23 Comment(2)
sounds like a bug to me ... testing ...Bouton
no repro in ie9 with latest source, can you try compiling from source and seeing if the demo mvc app fails that way?Bouton
A
1

For the last two

/mini-profiler-includes.css?v=1.9.0.0

/mini-profiler-includes.js?v=1.9.0.0

View the source and make sure you don't have any script or link elements with those urls in the src or href attributes. That would make a request to the server without your base url.

Applause answered 9/5, 2013 at 16:0 Comment(1)
Are the .js files in the same directory? Check the source js files for the profiler and make sure the references to the they are relative, if so you may need to simply add a ../Content in front of /mini-profiler-includes.js?v=1.9.0.0.Disburden
S
0

Did u added below code in you web config?? if not then add and try it

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

and also you can try with

<system.webServer>
    <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>
Scanlon answered 8/5, 2014 at 11:31 Comment(1)
Considering he had said that it works in Firefox, I would assume the web.config is configured correctly.Disburden

© 2022 - 2024 — McMap. All rights reserved.