bal*_*dre 13 installation iis-express asp.net-mvc-3 mvc-mini-profiler
我通过NuGet添加了Mini Profiler,虽然在一个非常简单的项目中工作很可爱,这是一个很大的现有项目,当然我遇到了一些问题 :(
它将源代码中的正确脚本标记写为
<link rel="stylesheet" type="text/css" href="/mini-profiler-includes.css?v=1.9.0.0">
<script type="text/javascript">
if (!window.jQuery) document.write(unescape("%3Cscript src='/mini-profiler-jquery.1.6.2.js' type='text/javascript'%3E%3C/script%3E"));
if (!window.jQuery || !window.jQuery.tmpl) document.write(unescape("%3Cscript src='/mini-profiler-jquery.tmpl.beta1.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript" src="/mini-profiler-includes.js?v=1.9.0.0"></script>
<script type="text/javascript">
jQuery(function() {
MiniProfiler.init({
ids: ["e48fcf61-41b0-42e8-935a-fbb1965fc780","870a92db-89bc-4b28-a410-9064d6e578df","30881949-bfdb-4e3a-9ea5-6d4b73c28c1d","6bca31b8-69d9-48eb-b86e-032f4d75f646","df16838d-b569-47d0-93e6-259c03322394"],
path: '/',
version: '1.9.0.0',
renderPosition: 'left',
showTrivial: false,
showChildrenTime: false,
maxTracesToShow: 15
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
但是当我尝试打开任何文件时,我得到了一个HTTP 404

我确认有一个MiniProfiler.cs不足App_Start并在那里添加一个断点,代码运行,我甚至补充说
#region Mini Profiler
protected void Application_BeginRequest()
{
if (Request.IsLocal)
{
MiniProfiler.Start();
}
}
protected void Application_EndRequest()
{
MiniProfiler.Stop();
}
#endregion
Run Code Online (Sandbox Code Playgroud)
到global.asax文件...
有什么东西显然我不见了吗?
Sam*_*ron 11
这是IIS的某些配置的已知问题.
解决方法是确保UrlRoutingModule处理所有迷你探查器包含在您的web.config:
<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>
Run Code Online (Sandbox Code Playgroud)
目前此问题有2张打开的门票:
在未来的版本中,为了避免这个问题,我们可能会提供包含无扩展名的服务.
| 归档时间: |
|
| 查看次数: |
4124 次 |
| 最近记录: |