Rank: Newbie Groups: Member
Joined: 4/23/2015 Posts: 5
|
I am creating Tabs on the fly and each one holds an instance of an EO.Browser. I declare a ProxyInfo object using the EO.Base namespace and THEN I instantiate a new WebView. I am using free proxy settings (without a username or password) just for testing purposes and whenever I go to "whatismyipaddress.com" to test it, I keep getting my own IP address.
What am I doing wrong? Here's my code. Note: MySettings is a public static class.
// add a new TAB to the TAB CONTROL Infragistics.Win.UltraWinTabControl.UltraTab newTab = liveTabs.Tabs.Add();
// now, add a WEB BROWSER control to the DEFAULT TabPage and assign to "browser" object
EO.WebBrowser.WinForm.WebControl browser = new EO.WebBrowser.WinForm.WebControl(); // define proxy server if (MySettings.EnableProxyServer) { EO.Base.ProxyType pt = new EO.Base.ProxyType(); pt = EO.Base.ProxyType.HTTP; EO.Base.ProxyInfo proxyInfo = new EO.Base.ProxyInfo( pt, MySettings.ProxyHostName, Convert.ToInt32(MySettings.ProxyPort), MySettings.ProxyUserName, MySettings.ProxyPassword);
EO.WebBrowser.Runtime.Proxy = proxyInfo; }
EO.WebBrowser.WebView webView = new EO.WebBrowser.WebView(); browser.WebView = webView;
Does someone have some sample code that works?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,203
|
Hi,
The Proxy settings must be set before any WebViews are created. It's a global setting. Setting proxy info after any WebView has been created would have no effect.
Thanks!
|