0

I have an ASP.NET website and am having trouble capturing some specific requests that are giving me trouble. The website calls an asmx web service that it also hosts (therefore makes a webservice call to (http://localhost/whatever.asmx)). I'm getting a 400: Bad Request back, so I want to figure out exactly what request is being made.

I can't use something like wireshark, because it's a call to localhost. What I'm trying now is implementing and registering a HttpModule to log requests. I don't think my HttpModule is getting called for these requests, but when I try on another machine where the request goes through, it gets hit every time.

Does IIS return with 400: Bad Request before my HttpModule gets hit? Is there something else I can hook into to be able to log the request?

Edit:
I'm starting to think I need some kind of ISAPI filter or extension. Not knowing anything about this, some help going this direction would be appreciated if this is the appropriate course of action.

4

2 に答える 2

2

この記事によると、一部のエラーはアプリケーションのエラー処理コードに到達しません。「HTTPベースのアプリケーションで発生する一部のエラーは、処理のためにアプリケーションに戻されるのではなく、HTTP APIによって自動的に処理されます。この動作は、エラーの頻度がイベントログまたはアプリケーションハンドラーにフラッディングする可能性があるために発生します。」

このようなエラーの例:400、約500、503、接続タイムアウトなど。

これらは、HTTP.sysの「httperr#.log」ファイルでのみ使用できるようです。同じ記事で、これらのログファイルの場所と形式について説明しています。

参照:HTTP400エラーのトラブルシューティング方法

于 2012-09-06T15:47:27.473 に答える
0

実際のページにはヒットしないはずですが、IIS は引き続き試行をログに記録します。

ログ ファイルの正確な場所は異なり、IIS マネージャーで確認できます。通常、IIS ログは C:\WINDOWS\system32\LogFiles\W3SVC1 にあります。

于 2012-08-08T18:50:03.717 に答える