WebBrowser - how to intercept and modify HTTP requests?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I would like to intercept WebBrowser's HTTP requests in order to be able to
supply custom login to the proxy server, as well as choose the right
certificate for several specific sites. I'm trying to use the stock
WebBrowser control in .NET v2.0 and have no idea how to extend it with
additional interfaces that are supported by the underlying AxWebBrowser
control.
Many thanks for any help concerning the suitable interfaces to handle this -
and how to implement them!
 
Ondrej,

You really aren't able to do this with the webbrowser (the managed
wrapper or the unmanaged version). The hooks simply are not in there to
intercept the HTTP request that the web browser makes.

You are better off using the HttpWebRequest/HttpWebResponse classes to
perform the request/get the response, and then feeding the response into the
web browser control for rendering.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top