5

I'm having some problems getting the POST results from MiniProfiler after the page has loaded.

I've tried a GET, and that works. But the POST returns a 404 error as if it were looking for a static file.

shot of error

Any help or hints as to what I can try next would be much appreciated.

Here's what I've looked at so far:

It's Not My Routes

The GET/POST issue would lead me to suspect a problem with my routes - except...

This problem only occurs on the live server. Locally, the routing runs fine.

It Might be: runAllManagedModulesForAllRequest?

Most things I've read suggest setting this to true. However my problem seems to contradict this.

The problem occurs when runAllManagedModulesForAllRequest="true" set to true, and is fixed when set to false. I would like to keep it set to true because I'm not knowlegable enough to change that from the default setting.

Adding a Handler Didn't Help

Other resources, like this one (at the bottom of MP's home page), suggest adding this line to system.webServer.handlers in web.config.

As I understand it, this should allow MP to run even if runAllManagedModulesForAllRequests is set to false. For me, it has had no effect either way.

<add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="integratedMode" />

But Could The handlers Section in Web.Config be Related?

I have no particular reason to think it is...

I just don't fully understand what it's doing and wonder if this could account for the difference between local and deployed versions.

<handlers>

  <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" />
  <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" />
  <remove name="ExtensionlessUrlHandler-Integrated-4.0" />
  <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
  <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
  <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

    <add name="MiniProfiler" path="mini-profiler-resources/*" verb="*" type="System.Web.Routing.UrlRoutingModule" resourceType="Unspecified" preCondition="" />
</handlers>
Community
  • 1
  • 1
Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64

0 Answers0