Search code examples
.netmvc-mini-profiler

MiniProfiler, get rid of request for own resources


What's the easiest way to get rid of profiling info about MiniProfiler's own resources, e.g http://localhost:9591/admin/mini-profiler-resources/results

Setup in Application_Start

GlobalFilters.Filters.Add(new ProfilingActionFilter());
MiniProfilerEF.Initialize_EF42(true);
MiniProfiler.Settings.SqlFormatter = new SqlServerFormatter();

var viewEnginesCopy = viewEngines.ToArray();
viewEngines.Clear();
foreach (var viewEngine in viewEnginesCopy)
    viewEngines.Add(new ProfilingViewEngine(viewEngine));

In _Layout before </body>

@StackExchange.Profiling.MiniProfiler.RenderIncludes()

Solution

  • This was an open bug in the 2.0.1 release, it has been fixed and deployed to nuget.