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

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
source share