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 ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate);
?
I get the "Invalid certification" message after I submit the login page of my school network with this code:
HtmlElementCollection ellements = webBrowser.Document.GetElementsByTagName("input");
foreach (HtmlElement ellement in ellements)
{
if (ellement.OuterHtml == "<INPUT onclick=\"this.value = 'Submitted'\" value=\" Login \" type=submit>")
{
ellement.InvokeMember("click");
this.DialogResult = DialogResult.OK;
break;
}
}