MiniProfiler not showing up on asp.net MVC

In MiniProfiler latest version:4.0.165. Be sure you added the code in Application_Start()

protected void Application_Start()
{
    ...
    MiniProfiler.Configure(new MiniProfilerOptions());//default setting
    MiniProfilerEF6.Initialize();
}

Doc is here: https://miniprofiler.com/dotnet/AspDotNet

And in latest version, you don't need add

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

in Web.config anymore.


In your web.config, add this:

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

If you want some sweet MVC Action profiling (unrelated to your problem), add this line to Application_Start in Global.asax.cs:

GlobalFilters.Filters.Add(new StackExchange.Profiling.MVCHelpers.ProfilingActionFilter());

If anybody tried Alden's solution and still does not work for you, try setting discardResults to false as suggested by willgrosett

   // Global.asax.cs file
   protected void Application_BeginRequest()
    {
        if (Request.IsLocal)
        {
            MiniProfiler.Start();
        }
    }

    protected void Application_EndRequest(object sender, EventArgs e)
    {
        MiniProfiler.Stop(discardResults: false);
    }