How to remove certificate messages from WebBrowser?

3

How do I remove those annoying messages showing that the page certificate is not valid or is it insecure from the System.Windows.Forms.WebBrowser component? I tried several ways and I did not find an alternative ...

One of the alternatives was to set this property:

WebBrowser1.ScriptErrorsSuppressed = True

but it did not work, the other was downloading a component called "GeckoFX" (the Mozilla browser) but it does not have any support for HTML5 ...

    
asked by anonymous 23.07.2015 / 04:45

1 answer

1

Try to call this, before opening webbrowser

ServicePointManager.ServerCertificateValidationCallback =
new RemoteCertificateValidationCallback(
    delegate
    { return true; }
);

Retired of this answer SOen

Incidentally, it is recommended that you understand the impact of ignoring these messages.

EDIT: I ended up leaving the answer in the original language. I do not program VB.Net but I think that's the equivalent.

ServicePointManager.ServerCertificateValidationCallback = New RemoteCertificateValidationCallback(Function() True)
    
23.07.2015 / 21:54