0

I'm doing a windows forms application and it requires me to log every url redirect that's happening on the user's machine. Like when a user googles something and he clicked on a sponsored link, there will be a number of redirects that'll happen there and i would like to track those redirects.

Is there any listener class that I can use to accomplish this?

2 Answers 2

3

If you're trying to monitor any browser the user may be running, implement a pass-through HTTP proxy and monitor the requests. The browser itself will still need to be configured to go through the proxy, and this process itself is browser-dependent.

While it is fairly straightforward, even a pass-through proxy is a nontrivial task, so you may want to base it on some third-party code such as Mentalis.org Proxy.

See Fiddler for an example of a tool that does this for debugging purposes.

Sign up to request clarification or add additional context in comments.

2 Comments

Nice -- I'd heard of Fiddler, but hadn't yet tried it out. Looks like it should solve the poster's question, too, since it can be incorporated into a .NET project. Thanks for the tip!
Not using a WebBrowser control & I'm trying to monitor any browser the user may be running. I've used fiddler and it would be great if I can implement listening to http redirects from my windows forms app. Imagine this app as a service app which listens to url/http requests
0

I think you mean referrer, not redirect. If that's the case, in global.asax, in the application_begin method, log httpcontext.current.request.referrer.uri.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.