I can't seem to find a way to use proxies with username and password (http/socks4). Any input would be great :)
I 'm using the .net wrapper, but I guess that does not make any difference.
Thanks,
John
I can't seem to find a way to use proxies with username and password (http/socks4). Any input would be great :)
I 'm using the .net wrapper, but I guess that does not make any difference.
Thanks,
John
You need to handle the WebControl LoginRequest
Event, that is if you
want to specify the user name an password in code
private void webcontrol_LoginRequest (object sender, LoginRequestEventArgs e)
{
e.Username = "username";
e.Password = "password";
e.Handled = EventHandling.Modal;
e.Cancel = false;
}
Test:
WebPreferences prefs = new WebPreferences() { ProxyConfig = "xxx.xxx.xxx.xxx:port" };
session = WebCore.CreateWebSession(prefs);
webcontrol = new WebControl() { WebSession = session };
webcontrol.LoginRequest += new LoginRequestEventHandler(webcontrol_LoginRequest);