开发者

MVC Mini Profiler on IIS 6

开发者 https://www.devze.com 2023-03-13 08:33 出处:网络
Has anyone been able to get the MVC mini profiler working on IIS 6? I\'ve set up the profiler in my application and it works perfectly in Visual Studio, IIS Express and IIS 7.5 but when I put the exac

Has anyone been able to get the MVC mini profiler working on IIS 6? I've set up the profiler in my application and it works perfectly in Visual Studio, IIS Express and IIS 7.5 but when I put the exact same application onto IIS 6 it won't work.

The p开发者_Go百科roblem seems to be around loading /mini-profiler-includes.js, I just get a 404 response. I've checked the route table and the correct routes have been registered by the profiler but apart from that I'm not sure what else to try.


On IIS 7, ASP.NET by default runs in integrated mode so the ASP.NET runtime will handle all requests, however on IIS 6 ASP.NET only handles extensions explicitly listed in the mappings section.

When the request comes in for /mini-profiler-includes.js IIS sees the .js and tries to serve the static file but as the file is "generated" by ASP.NET the handler never gets hit and a 404 error is returned.

In order to fix this you need to add a wildcard mapping to IIS so all requests get handed to ASP.NET. This blog post has a good walkthrough of the process.

0

精彩评论

暂无评论...
验证码 换一张
取 消