4

We're trying to configure MiniProfiler with an ASP.NET WebForms app that runs in a classic mode app pool (cannot change it to integrated). We couldn't get the handlers to work so loading the resources failed.

To solve this we included the .js, .css, .tmpl, and .html from https://github.com/SamSaffron/MiniProfiler/tree/master/StackExchange.Profiling/UI After doing that these resources get loaded, but we still don't see anything.

The initialization script is rendered in the final html, but the ... block never gets generated. I'm assuming because the script never runs. We tried loading jQuery v1.7.1 and a newer version; neither worked.

There are no 404s or anything in the console (Chrome or FireFox). Any ideas? Thanks.

pbz
  • 8,865
  • 14
  • 56
  • 70

1 Answers1

0

Are you having the issue running the profiler in IIS on your local machine or on a server?

The quick code sample on the miniprofiler.com site suggests wrapping the MiniProfile.Start() call in a Request.IsLocal condition (code below), this would prevent the profiler from being rendered on the server (unless you were viewing the page from the server itself). Try removing the Request.IsLocal code and see if that helps.

protected void Application_BeginRequest()  
{  
    if (Request.IsLocal)  
    {  
        MiniProfiler.Start();  
    }   
}
Brent Keller
  • 1,385
  • 1
  • 12
  • 17
  • 1
    It was through the local IIS when running a pool in classic mode. We actually did not use the Request.IsLocal, we always called MiniProfiler.Start()/Stop(). Some script gets rendered in the final HTML, it just doesn't work (i.e. we don't see the block in the top left corner). Thanks. – pbz Feb 23 '13 at 14:39
  • Have you tried setting up the start/stop in the application_beginrequest/application_endrequest events? I haven't spent a lot of time with the profiler but it may just expect it to be available for the length of the request in order to write the display to the response. – Brent Keller Feb 25 '13 at 02:06
  • Yes, we use Application_BeginRequest and Application_EndRequest; without these nothing gets rendered in the final HTML. Thanks. – pbz Feb 25 '13 at 13:14