I am using VSTS 2008 + C # .Net 3.5 to develop a Silverlight 3 application, and I need to access some https address on a different web server (except for the server that supplies the Silverlight application).
Here is my code that works with the console application .Net 3.5. But I can not find a class like ServicePointManager when using Silverlight. Any suggestions on how to implement the same function in Silverlight (accept all certificates from the server).
public static void SetBypassSslCertificateValidation() { ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(BypassSslCertificateValidation); } private static bool BypassSslCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) { return true; }
source share