I want to watch all the HTTP requests going out of a certain application and cancel them if needed.
Is there a way to do this in C#?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you can touch the system’s proxy configuration (which is used by many applications) or, if the app doesn’t heed that setting, touch the application’s configuration to use a proxy of your choice, you can create a HTTP proxy that would do the job for you.
If you just want to profile, there is a ready made tool that behaves like this and is very nice, Fiddler.
Else you’d have to go deeper into the network stack and implement something like a sniffer/firewall, for instance using WinPcap. That’s a lot harder to do.