How to disable the "Security Warning" window in a Webbrowser control

I am using a Webbrowser control to enter the HTTPS site. but I get a Security Warning popup:

Security warning window

the codes below do not work. Why?

ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(ValidateServerCertificate); public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; } 

where should i put these codes?

there is also another old thread in stackoverflow with a codeproject link.
it doesn't work either ...

How to disable this warning?

I am using visual studio 2010 and .net 4 ...

early

+4
source share
1 answer

Change the ScriptErrorsSuppressed property of the WebBrowser to true .

+7
source

All Articles