MVC Mini Profiler on IIS 6

前端 未结 1 1665
孤城傲影
孤城傲影 2021-01-01 17:25

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

相关标签:
1条回答
  • 2021-01-01 18:02

    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 讨论(0)
提交回复
热议问题