大佬教程收集整理的这篇文章主要介绍了asp.net – MVC-Mini-Profiler – Web窗体 – 找不到/ mini-profiler-results,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
的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>标签在我的页面,但它是空的。
如果我看着chrome控制台,我看到一个404试图找到:http://example.com/mini-profiler-results?id=339d84a7-3898-429f-974b-64038462d59a&popup=1
题
我错过了一个让/ mini-profiler-results链接工作的一步吗?
回答
我标记为答案的答复使我认为它与我的配置无关(这是真的)。我正在使用Umbraco 4.7.0。我必须在我的web.config中添加“〜/ mini-profiler-results”到umbracoReservedUrls和umbracoReservedPaths。
<%@ Page Language="C#" %> <%@ Import Namespace="MvcMiniProfiler" %> <%@ Import Namespace="System.Threading" %> <script type="text/c#" runat="server"> protected void Page_Load(object sender,EventArgs E) { MiniProfiler.Start(); using (MiniProfiler.Current.Step("I'm doing stuff")) { Thread.Sleep(300); } MiniProfiler.Stop(); } </script> <!DOCTYPE html> <html> <head runat="server"> <title></title> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> <%= MiniProfiler.RenderIncludes() %> </head> <body> <form id="Form1" runat="server"> <div>Hello World</div> </form> </body> </html>
以上是大佬教程为你收集整理的asp.net – MVC-Mini-Profiler – Web窗体 – 找不到/ mini-profiler-results全部内容,希望文章能够帮你解决asp.net – MVC-Mini-Profiler – Web窗体 – 找不到/ mini-profiler-results所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。