Question

I tried EF Tracing Provider to check the SQL statements generated, but now I want to use MiniProfiler, but I'm not able to see the results...

What I made so far:

  • Intalled packages: enter image description here

  • Uncomment initialization in MiniProfiler.cs

public static void PreStart()
{
    //...
    //TODO: If you are profiling EF code first try: 
    MiniProfilerEF.Initialize();
    //...
}
  • Added the render in the layout view (before closing the body tag):

    @MiniProfiler.RenderIncludes()
    

But nothing is showing in the browser relative to the miniprofiler... I'm using database-first approach.

Am I missing something?

Was it helpful?

Solution

The following code should be added in the web.config:

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <handlers>
      //...
    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
    </handlers>
  </system.webServer>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top