Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to log HTTP requests coming into IIS

Tags:

http

iis

I run IIS 5 on my dev machine. I have an asp.net 3.5 web service running on it which I'm calling from a different web app running on the same server. My service is returning an error 500 Internal Server error and I'm troubleshooting it. My request is being sent via a System.Net.HttpWebRequest object and it looks valid from the client's perspective.

I'd like to see the raw incoming HTTP request from the server's perspective. Since the service is being called on loopback, I can't use Wireshark to see it.

IIS Logging shows me the request header but not the post content.

Any suggestions on how I could see the full raw incoming HTTP request in IIS?

Thanks

like image 928
srmark Avatar asked Apr 13 '09 16:04

srmark


People also ask

Where are the IIS connection logs?

Where are IIS log files stored? IIS Logs Location: On a standard Windows Server, IIS log files are found at %SystemDrive%\inetpub\logs\LogFiles by default.


1 Answers

I would think you want to add an HTTPModule for logging. Here's a pretty good article on ASP.NET modules and handlers:

That way, when you want to disable logging, you can just remove/comment it from your web.config file.

like image 153
Dave Nichol Avatar answered Sep 21 '22 17:09

Dave Nichol