Welcome Guest Search | Active Topics | Sign In | Register

Proxy authorization problem Options
rainstuff
Posted: Tuesday, January 24, 2017 6:43:16 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
Hi! I have a problem with proxy. I'm trying to set username and password via webView1.Engine.Options.Proxy.
All is ok, but before loading page, there is a popup, asking me to fill username and password again. How I can remove this popup?
Proxy and username/password are good.
what i'm doing wrong?

My code:
Code: C#
webView1.Engine.Options.Proxy = new EO.Base.ProxyInfo(EO.Base.ProxyType.HTTP, proxy, proxyport, username, password, BypassList);



if I put this code on event NeedCredentials, there is no popup, but why it is not working on proxy init?:

Code: C#
private void webView1_NeedCredentials(object sender, NeedCredentialsEventArgs e)
{
     e.Continue(username, password);
}
rainstuff
Posted: Tuesday, January 24, 2017 7:15:23 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
This works only before webview init:

Code: C#
EO.WebBrowser.Runtime.Proxy = new EO.Base.ProxyInfo(EO.Base.ProxyType.HTTP, proxy, proxyport, username, password, BypassList);


How I can make the same change in current webview?



rainstuff
Posted: Tuesday, January 24, 2017 7:37:19 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
Finally, this works for me:

Code: C#
EO.Base.ProxyInfo proxyinfo = new EO.Base.ProxyInfo(EO.Base.ProxyType.HTTP, proxy, proxyport, username, password, BypassList);
            EO.WebBrowser.Runtime.Proxy = proxyinfo;
            webView1.Engine.Options.Proxy = proxyinfo;


Need to use both authorizations - on webbrowser and webview
eo_support
Posted: Tuesday, January 24, 2017 8:36:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
Hi,

Please try to use:

Code: C#
EO.WebEngine.Engine.Default.Options.Proxy = proxyInfo;


This single line should be sufficient for you.

Thanks!
rainstuff
Posted: Wednesday, January 25, 2017 2:10:42 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
No, if I use only this string:
EO.WebEngine.Engine.Default.Options.Proxy = proxyInfo;
Popup appears again.

And another problem - I can't change proxy at all, if any url already loaded in WebView (or WebView in state EO.WebEngine.EngineState.Running).
eo_support
Posted: Wednesday, January 25, 2017 8:29:49 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,229
The proxy configuration is passed to the engine as a start up parameter. So you can not change Proxy once the engine has started. If you want to use a different proxy setting, you must restart the engine. See here for more information on how to use the engine:

https://www.essentialobjects.com/doc/webbrowser/advanced/engine.aspx
rainstuff
Posted: Wednesday, January 25, 2017 8:46:12 AM
Rank: Advanced Member
Groups: Member

Joined: 9/20/2016
Posts: 73
Ok, and one more question - how to destroy current engine?
Just call Engine.Stop()?

After that I try to create engine with the same name and get error that Engine already destroyed. If I use different name - all is ok.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.