Miniprofiler和umbraco
我正在运行一个umbraco 7的实例。但我似乎无法将miniprofiler设置为使用它 在my global.asax上设置此选项:Miniprofiler和umbraco,umbraco,mvc-mini-profiler,umbraco7,mvcminiprofiler,Umbraco,Mvc Mini Profiler,Umbraco7,Mvcminiprofiler,我正在运行一个umbraco 7的实例。但我似乎无法将miniprofiler设置为使用它 在my global.asax上设置此选项: protected void Application_BeginRequest() { if (Request.IsLocal) { MiniProfiler.Start(); } } protected void Application_EndReque
protected void Application_BeginRequest()
{
if (Request.IsLocal)
{
MiniProfiler.Start();
}
}
protected void Application_EndRequest()
{
MiniProfiler.Stop();
}
还定义了web.config上的处理程序:
<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
非常感谢您的帮助。您的global.asax文件是从umbraco global http类继承的,还是从您编写此代码的类继承的?如果是前者,那就行不通了。尝试改用Web激活器。或者从global.asax.cs中的umbraco全局文件继承 MiniProfiler内置于Umbraco v6和v7中。您不必手动设置它。您只需通过在AppSettings中设置key来启用调试模式:
<add key="umbracoDebugMode" value="true" />
并使用?umbDebug=true查询字符串参数加载页面。在Umbraco 7中,至少不需要
appSettings
键-只需确保debug=“true”
在web.config
文件的
元素上像往常一样设置。我认为您还需要将EnableMiniProfiler
的appsetting设置为true,否则您仍然无法获得迷你探查器。