asp.net-mvc-3 – Mini Profiler不渲染脚本
|
我已经添加 Mini Profiler到 NuGet,虽然在一个非常简单的项目工程可爱,这是一个大而现存的项目,当然,我有一些问题: 它在源代码中写入正确的脚本标签 <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>
但是当我尝试打开任何文件时,我会收到一个HTTP 404 我验证了在App_Start下有一个MiniProfiler.cs,并在其中添加了一个断点,代码运行,我甚至添加 #region Mini Profiler
protected void Application_BeginRequest()
{
if (Request.IsLocal)
{
MiniProfiler.Start();
}
}
protected void Application_EndRequest()
{
MiniProfiler.Stop();
}
#endregion
到global.asax文件…
解决方法这是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>
目前有两张这个问题的公开机票: > http://code.google.com/p/mvc-mini-profiler/issues/detail?id=50 在未来的版本中,为避免这个问题,我们可能会为我们的包含扩展服务. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc – ASP.NET MVC HTML帮助程序可以渲染没有ID属
- asp.net-mvc-3 – Telerik().ScriptRegistrar()如何防止加载
- powershell – 如何检查asp.net mvc 3是否已安装?
- entity-framework-4 – 通过扩展方法的IDbSet和公开包含方法
- asp.net-mvc – 确定是否在布局页面中调用了RenderSection(
- asp.net – VS 2010 Web.config转换进行调试
- asp.net – 干净的方式来防止输入按钮提交表单
- asp.net-mvc-4 – Quartz.NET触发器不会触发,MVC4
- ASP.NET MVC 2加载部分视图使用jQuery – 没有客户端验证
- asp.net – 从ASP .Net应用程序上传大文件
- iis-6 – 如何防止IIS覆盖我在ASP.NET中设置的文
- 在MVC 5中上传图像时,asp.net-mvc – Request.Fi
- .net – 有什么简单的方法可以将标准转换为HQL吗
- 从asp经典转换到asp.net最简单的方法是什么?
- asp.net – LINQ:列表中唯一项目的计数
- asp.net-mvc – ASP.NET MVC ActionLink外部区域
- asp.net-mvc – 使用LINQ to SQL在ASP.NET MVC中
- asp.net-mvc-3 – 不支持使用相同的DbCompiledMo
- asp.net – 在.NET 4下编译时出现“具有相同密钥
- asp.net-mvc – 使用Html.BeginForm发布到当前控
