IIS 6上的MVC Mini Profiler [英] MVC Mini Profiler on IIS 6

查看:117
本文介绍了IIS 6上的MVC Mini Profiler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能够在IIS 6上使用MVC mini profiler吗?我已经在应用程序中设置了事件探查器,它可以在Visual Studio,IIS Express和IIS 7.5中完美运行,但是当我将完全相同的应用程序放到IIS 6上时将无法工作.

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.

问题似乎与加载/mini-profiler-includes.js有关,我只收到404响应.我已经检查了路由表,并且探查器已注册了正确的路由,但除此之外,我不确定还可以尝试什么.

The problem 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.

推荐答案

在IIS 7上,默认情况下,ASP.NET以集成模式运行,因此ASP.NET运行时将处理所有请求,但是在IIS 6上,ASP.NET仅处理扩展在映射部分中明确列出.

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.

当请求进入/mini-profiler-includes.js时,IIS会看到.js并尝试为静态文件提供服务,但是由于该文件是由ASP.NET生成"的,因此处理程序永远不会受到攻击,并且会返回404错误.

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.

为了解决此问题,您需要向IIS添加通配符映射,以便将所有请求传递到ASP.NET. 博客文章该过程的演练.

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.

这篇关于IIS 6上的MVC Mini Profiler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆