如何记录进入IIS的HTTP请求 [英] How to log HTTP requests coming into IIS

查看:373
本文介绍了如何记录进入IIS的HTTP请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开发机器上运行IIS 5。我在其上运行了一个asp.net 3.5 Web服务,我从同一服务器上运行的另一个Web应用程序调用。我的服务返回错误500内部服务器错误,我正在对其进行故障排除。我的请求是通过 System.Net.HttpWebReques t对象发送的,从客户的角度看它是有效的。

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.

我想从服务器的角度看待原始的传入HTTP请求。由于服务是在环回上调用的,我不能使用Wireshark来查看它。

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向我显示请求标题但不显示帖子内容。

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

有关我如何看到的任何建议IIS中的完整原始传入HTTP请求?

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

谢谢

推荐答案

我想你想添加一个HTTPModule用于记录。 这里是一篇关于ASP.NET模块和处理程序的非常好的文章:

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

这样,当您想要禁用日志记录时,您只需从web.config文件中删除/注释它。

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

这篇关于如何记录进入IIS的HTTP请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆