views:

747

answers:

2

Is it possible to intercept all requests made by a WebBrowser control?

I want to modify the request URI of every single request (including requests for images, scripts, stylesheets, etc.)

A: 

Is the WebBrowser class sealed? You could always just inherit it and override the request-output logic.

GWLlosa
+1  A: 

There is an event called "BeforeNavigate2" that is called before any request is made. You can use this to modify the outgoing requests.

David
Is it called before any request, or before each page change? By request I mean the individual requests for images, css, etc.
Charlie Somerville
No, it's only called for navigations. There's no public way to monitor individual subdownloads. You can use Fiddler for that.
EricLaw -MSFT-