4

Can anyone please guide me how can I find out which handlers are being called when request is made from asp.net application.

P.S. I have added handler mapping for .htm files to call for executable aspnet_isapi.dll which were not available by default. But I want to make sure the same is called when a page(.htm) is requested from the website.

Thank you!

iniki
  • 167
  • 2
  • 6

3 Answers3

4

Install "Tracing" in the Web Server Role's Health and Diagnostics group via Server Manager's Roles interface, and then configure and enable Failed Request Tracing.

Enable Failed Request Tracing in the Actions pane at the Site level.

Then configure a Failed Request Tracing rule to trace all pages on a 200 response (the feature's called "Failed Request", but the criteria can be defined by you).

Push a couple of requests through, and open the \Inetpub\Logfiles\FailedReqLogs\W3SVCN folder, and double-click any of the XML files to view them.

The output will show you what modules were called on the path through the pipeline.

TristanK
  • 9,073
  • 2
  • 28
  • 39
  • It's a good method. But to my understanding only one handler can be called for one request. So what keywords can I search for this handler? – Gqqnbig Nov 16 '15 at 23:57
  • You just look for whichever handler was called. If the handler you're interested in isn't called, it won't be present (i.e. searching for the name of the handler is the "obvious" answer, but might not work if it's not being called... so just look for the handler execution steps and find out what's being run from there). – TristanK Jan 07 '16 at 01:54
2

IIS does not log this information by default. The handler would need to log it itself, or you would need to develop a custom log handler that would do it.

squillman
  • 37,883
  • 12
  • 92
  • 146
0

I'd recommend considering both, FRT (Failed Request Tracing) configured with IIS - it's a bit terse/detailed but can show you (& 'FrebViewer' is a good enough tool to view the files with), and (a simple) 'Trace' set-up (as a slightly poorer-man's "log"ging) - cos you'll probably want to keep the 'Trace'ing; e.g. configured within the 'Web.config' file:

  <system.diagnostics>
    <trace autoflush="true" indentsize="4">
      <listeners>
        <add name="configFileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="Logs\Trace.log" />
      </listeners>
    </trace>
  </system.diagnostics>

(Assuming you've granted your application pool's user/'identity' write/'Modify' permission upon a "Logs" directory/folder so as to be able to write to a "Trace.log" file - based upon this example configuration directly above)

DennisVM-D2i
  • 180
  • 4