And*_*rko 3 webforms mvc-mini-profiler miniprofiler
所以我正在尝试将 MiniProfiler ( https://github.com/MiniProfiler/dotnet ) 用于 WebForms 网站。我所做的是:
添加 <%= StackExchange.Profiling.MiniProfiler.RenderIncludes() %> 语句
设置在 web.comfig
而且仍然 MiniProfiler 不起作用。简单的故障排除显示(在 Chrome 开发工具中)在该页面上我希望看到 MiniProfiler,我看到
http://localhost/mycoolsite/mini-profiler-resources/results 404.0 - 未找到
更多信息:我使用 .Net FW 4.5.1、IIS8 和 Intergated Mode(应用程序池)
任何想法可能对我有用?
我最近(非常!)写了一篇关于这个的博客,特别是让 MiniProfiler 在混合 WebForms/MVC 应用程序中工作的过程。
根据您概述的步骤,您似乎遗漏了(与我所拥有的相比):
<%= StackExchange.Profiling.ClientTimingHelper.InitScript %>
Run Code Online (Sandbox Code Playgroud)
也就是说,即使没有该行,我仍然会看到服务器端计时和 MiniProfiler UI,因此我怀疑您的web.config输入不正确。
检查以确保你已经把这个configuration> system.webServer>handlers中的web.config:
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
Run Code Online (Sandbox Code Playgroud)
您还可以检查其他一些事项:
web.config,或者位于它与添加handlers条目 which <clear />shandlers之间的文件夹中?| 归档时间: |
|
| 查看次数: |
1175 次 |
| 最近记录: |