Friday, October 14, 2011

Could not establish trust relationship for the SSL/TLS secure channel


Default Re: Could not establish trust relationship for the SSL/TLS secure channel.

    Hello,
    the certificate of the server is invalid or not trusted.
    You can either add the root certificate of the server to the trusted root
    certificate store, or use this code to override the check of the .NET
    Framework:

    ..NET 2.0:

    ServicePointManager.ServerCertificateValidationCallback = delegate { return
    true; };

    ..NET 1.1:

    Implement the ICertificatePolicy interface (See MSDN for an example)

No comments:

Post a Comment