Problem with https connection

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; } 
+4
source share
1 answer

Silverlight leaves trusted solutions for web services and other content to the web browser, as it uses BHWR (browser network stack).

As a result, you cannot circumvent certificate verification using any APIs in Silverlight.

You might be able to explore specific configuration options or security / zone settings for your web browser if you want to use this for testing.

0
source

All Articles