You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use miniprofiler in an MVC 5 application, I have followed all the steps mentioned here: MiniProfiler for .NET
with a difference in Global.aspx
protected void Application_Start()
{
MiniProfiler.Configure(new MiniProfilerOptions
{
Storage = new MemoryCacheStorage( new System.TimeSpan(1,0,0) ),
ResultsAuthorize = request => {return true;},
// The rest of the options go here
.
.
}
.AddViewProfiling()
);
}
protected void Application_BeginRequest()
{
// For all requests, not only local
MiniProfiler.StartNew();
}
It works locally, but not when deployed on IIS. I get 404 not found error for "profiler/results", and when I navigate to "profiler/results-index" I get an empty table with headers only.
Can you paste the section of your web.config? My only guess here is they're not running in all cases, though I'm puzzled that you get a results list at all. Is it possible you're never stopping the profilers to save them? e.g. in the docs:
protectedvoidApplication_EndRequest(){MiniProfiler.Current?.Stop();// Be sure to stop the profiler!}
Activity
NickCraver commentedon Oct 28, 2022
Can you paste the section of your web.config? My only guess here is they're not running in all cases, though I'm puzzled that you get a results list at all. Is it possible you're never stopping the profilers to save them? e.g. in the docs:
Ninashka commentedon Oct 30, 2022
Hi, here is the section of my config:
And, yes, I am stopping the profiler in Application_EndRequest