MiniProfiler ASP.NET MVC5 not able to get results

143 Views Asked by At

I am trying to use MiniProfiler for the ASP.NET MVC application. I installed the following NuGet packages. I configured the MiniProfiler in both Global.ascx and Also the script in my _Layout. But I am getting post script error for getting results. The loads without issue. But I don't get the results and no Icon on browser because there is no result to display due to POST error.

1- MiniProfiler.MVC5 2- MiniProfiler.EF6

Error: enter image description here

Web.Config:

enter image description here

Global.ascx - application start:

enter image description here

enter image description here

Load script tag: enter image description here

1

There are 1 best solutions below

0
On

In the current implementation, you'll accumulate MiniProfilers that never end, likely resulting in a memory leak (I'm noting this in case you're investigating those symptoms). It's a quick fix though!

If you check out the MiniProfiler MVC5 sample project here: Samples.Mvc5/Global.asax, the important difference is where the profiler is stopped. Ultimately, you want the Application_EndRequest (magically named) method to stop a per-request profiler, rather than the current Application_End which will only shut down the current profiler (...which is likely null) when the application finally ends overall.