简体   繁体   中英

How to monitor outgoing HTTP connections in .NET?

How does one log all outgoing HTTP connections in .NET from a Windows 7 computer? I can see the connections in Fiddler, but I want my own program to log those connections.

I found IPGlobalProperties.GetActiveTcpConnections . But that requires polling. Is there a better way?

There are many ways.

Fiddler is one.

System.net tracing is another. I suggest you use implement your own trace writer and you get all information coming to you to log.

System.net tracing does not store all the data, only the first 1024 bytes.

执行fiddler2的操作:实施分层服务提供程序

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM