Skip to content

"profiler/results" not found on production #624

Open

Description

@Ninashka

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.

Activity

  1. NickCraver commented on Oct 28, 2022

    @NickCraver
    Member

    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:

    protected void Application_EndRequest()
    {
        MiniProfiler.Current?.Stop(); // Be sure to stop the profiler!
    }
  2. Ninashka commented on Oct 30, 2022

    @Ninashka
    Author

    Hi, here is the section of my config:

    <system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
    
    <handlers>
    
      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
      <remove name="OPTIONSVerbHandler" />
      <remove name="TRACEVerbHandler" />
    
      <add name="MiniProfiler" path="profiler/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />
      
     <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
    
      
    </handlers>
    
    <httpErrors errorMode="Detailed" existingResponse="Replace">
      <remove statusCode="404" />
      <error statusCode="404" path="404.html" responseMode="File" />
      <remove statusCode="500" />
      <error statusCode="500" path="500.html" responseMode="File" />
    </httpErrors>
    </system.webServer>
    

    And, yes, I am stopping the profiler in Application_EndRequest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions