2

I know IIS logs all requests made to the server.

If my application makes requests out to other web services, is there a way to see what the response was or at least the headers of the responses?

Omar
  • 195
  • 3
  • 14

3 Answers3

4

I think you would have to write this into your application logging function. Alternately you could use a tool like Fiddler2 to sit between the outgoing app and responses to track activity.

Omar
  • 195
  • 3
  • 14
uSlackr
  • 6,412
  • 21
  • 37
2

No.

Why not? Because you're not using IIS to make the request. You're using ASP.Net or WinHTTP or your own sockets-based application. IIS is just a container for your app.

So because it doesn't make requests, "IIS" doesn't listen for responses. Your application does that. Depending on your app framework, you may be able to enable logging externally; otherwise, uSlackr's Fiddler suggestion is about it.

TristanK
  • 9,073
  • 2
  • 28
  • 39
  • But when the response comes back (from the web service) to the IP that made the request, doesn't it go through IIS then to the app? – Omar Jun 16 '11 at 03:50
  • @Omar No. IIS listens for request directed at your server (usually port 80). If you call a web service from your code that is an outgoing connection not an incoming connection. IIS has nothing to do with any outgoing connections or any incoming connections that are made to other ports. – Greg Bray Jun 16 '11 at 04:13
  • No. IIS accepts requests over HTTP only via HTTP.sys when they're initially generated. Everything the app does from that point on is up to the app - all the examples I mentioned above use Windows Sockets to create outbound connections (or at least, I assume they do if they're not using WinPCAP to generate raw network frames). This has fundamentally nothing to do with IIS, and everything to do with the app. If you can't change your app, network tracing or an app-layer proxy like Fiddler are your only options. – TristanK Jun 16 '11 at 04:23
1

IIS only logs high level information for requests processed by the web server like the user's IP address, URL requested, and the status code that was returned (200,404, etc). See this website for an example of the data that gets logged. If you want to view the raw results of your code you will need to use a packet sniffer like wireshark or a debugging proxy like fiddler.

Greg Bray
  • 5,610
  • 5
  • 36
  • 53
  • Does IIS log responses it gets via a request an application makes. (Example, a website on IIS that makes a web service request to Amazon or some other API?) – Omar Jun 16 '11 at 00:49
  • No... those request come from the .NET framework, not IIS. IIS only logs request that are processed by the webserver. – Greg Bray Jun 16 '11 at 04:08