Miniprofiler和umbraco

ant*_*tao 4 umbraco mvc-mini-profiler mvcminiprofiler umbraco7

我正在运行umbraco 7的实例.但我似乎无法设置miniprofiler来使用它.

在我的global.asax上设置它:

    protected void Application_BeginRequest()
    {
        if (Request.IsLocal)
        {
            MiniProfiler.Start();
        }
    }

    protected void Application_EndRequest()
    {
        MiniProfiler.Stop();
    }
Run Code Online (Sandbox Code Playgroud)

还定义了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)

真的很感激任何帮助.

小智 9

MiniProfiler内置于Umbraco v6和v7.您不必手动设置它.您所要做的就是通过在AppSettings中设置键来启用调试模式:

<add key="umbracoDebugMode" value="true" />
Run Code Online (Sandbox Code Playgroud)

并使用?umbDebug = true查询字符串参数加载页面.

  • 在Umbraco 7中,至少你不需要`appSettings`键 - 你只需要确保在`web.config`文件的`<compilation>`元素中像往常一样设置`debug ="true"`. (2认同)