FreeKB - MVC Mini Profiler
MVC - Mini Profiler

Install the mini profiler.

  1. In Visual Studio, select Tools > NuGet Package Manager > Package Manager Console.
  2. Type install-package miniprofiler and press enter.


Add the following to the global.asax file.

using StackExchange.Profiling;

protected void Application_BeginRequest()
    if (Request.IsLocal)

protected void Application_EndRequest()


Add the following to the head of the _Layout.cshtml file.



Add the following to the web.config file.

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


The source of the page should now have the following HTML:

<script async type="text/javascript" id="mini-profiler" src="/mini-profiler-resources/includes.js"...>


A small div should now appear near the upper left-hand corner of your site. Selecting the div will show details.


By default, the mini profiler will appear on your home page ( in this example), but will not appear on other pages. 


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter fc465 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |