我试图让MVC迷你分析器使用webforms。MVC迷你分析器 - Web窗体 - 找不到/迷你分析器结果
NUGET
我已经安装了Nuget包。
PM> Install-Package MiniProfiler
头
我有这个在我的网站的头部。
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<%= MvcMiniProfiler.MiniProfiler.RenderIncludes() %>
DAL
我用这一个功能作为一个POC内。这不是在Global.asax(我不如果那是必需的或不知道。)
profiler = MiniProfiler.Start();
using (profiler.Step("Im doing stuff"))
{
//do stuff here
}
MvcMiniProfiler.MiniProfiler.Stop();
结果
它使得我的网页上一个<div class="profiler-results left"></div>
标签,但它是空的。
如果我看着铬控制台我看到一个404试图找到:http://example.com/mini-profiler-results?id=339d84a7-3898-429f-974b-64038462d59a&popup=1
问题
我错过了一步拿到/迷你探查,结果链接的工作?
回答
我标记为答案使我觉得这没有什么与我的配置做的(这是真的)的响应。我正在使用Umbraco 4.7.0。我不得不在我的web.config中将“〜/ mini-profiler-results”添加到umbracoReservedUrls和umbracoReservedPaths。
参见http://stackoverflow.com/questions/15087101/miniprofiler-for-asp-net-web-site – 2017-03-27 20:39:20