I have the same problem as here: How to disable "Security Alert" window in Webbrowser control
I like the answer, but where am I going to place the Se
Try this:
private static bool ValidateRemoteCertificate(
object sender,
X509Certificate certificate,
X509Chain chain,
SslPolicyErrors policyErrors)
{
// Logic to determine the validity of the certificate
// return boolean
}
// allows for validation of SSL conversations
ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(
ValidateRemoteCertificate
);
HtmlElementCollection ellements = webBrowser.Document.GetElementsByTagName("input");
foreach (HtmlElement ellement in ellements)
{
if (ellement.OuterHtml == "")
{
ellement.InvokeMember("click");
this.DialogResult = DialogResult.OK;
break;
}
}