views:

536

answers:

2

How can I set a proxy for a Webbrowser Control without setting a proxy for IE?

Basically I want my application to use a certain proxy however obviously I don't want to change user's IE proxy settings.

+1  A: 

No, you can not . The WebBrowser control IS IE. It is the IE rendering engine below. Basically IE.exe is someting like a UI around it.

TomTom
Well WebBrowser control allows you to override many things I don't know why it doesn't support such a simple and obvious requirement. Is there any clever workaround this? Or do I have to remember the users' proxy settings, then revert it back when the app finishes it job.
dr. evil
+2  A: 

try UrlMkSetSessionOption INTERNET_OPTION_PROXY and UrlMkSetSessionOption INTERNET_OPTION_REFRESH

If your proxy has password authentication, you may need to implement IAuthenticate(Ex) in your WebBrowserSiteBase derived class.

Sheng Jiang 蒋晟
This sounds really good, now all I need to deal with Webbrowser control COM madness! :) Thanks.
dr. evil