Hi,
I´d like to implement Basic and Digest authentication for a webbrowser
control in my C# application.
For Basic authentication i´ve already found a solution, which uses an
additional header:
string hdr = "Authorization: BASIC " + Convert.ToBase64String(Encoding.ASCII.GetBytes(uname + ":" + pwd)) + " " + System.Environment.NewLine;
webBrowser1.Navigate(url, null, null, hdr);
But for Digest authentication there are only some solutions which demonstrate how to use with web requests.
WebClient webcli = new WebClient();
CredentialCache authcache = new CredentialCache();
authcache.Add(new Uri(url), "Digest", new NetworkCredential(uname,
pwd));
webcli.Credentials = authcache;
string results =
System.Encoding.UTF8.GetString(webcli.DownloadData(url));
Is there a way to implement this for the webbrowser control?
A code snippet would be greatly appreciated.
Thanks,
Tony