简体   繁体   中英

Miniprofiler and umbraco

I'm running an instance of umbraco 7. But I can't seem to set miniprofiler to work with it.

Set this on my global.asax:

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

    protected void Application_EndRequest()
    {
        MiniProfiler.Stop();
    }

Also defined the handler on the web.config:

 <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />

Any help is truly appreciated.

MiniProfiler is built in to Umbraco v6 and v7. You don't have to manually setup it. All you have to do is to enable debug mode by setting key in AppSettings:

<add key="umbracoDebugMode" value="true" />

And load page with ?umbDebug=true query string parameter.

Does your global.asax file inherit from the umbraco global http class, or the one where you are writing this code? If the former, it won't work. Try using Web Activator instead. Or inherit from the umbraco global file in your global.asax.cs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM