Sevki
Sevki

Reputation: 3682

How do you bypass TLS/SSL cetification validation in WCF for Exchange Web Services

I wan't to bypass SSL and use regular http protocol to connect to a Exchange 2007 server however we dont want to invest in a real SSL cert and the one we use is needed for blackberry enterprise server. Is there a way to bypass this here is the exception

Request failed. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Service.Credentials = new WebCredentials(ShacxEwsUserName, ShacxEwsUserPassword, ShacxEwsUserDomain);
        Service.Url = new Uri(ShacxEwsServiceUrl);

How do you make ExchangeService accept bad ssl.

Upvotes: 3

Views: 4818

Answers (2)

Sevki
Sevki

Reputation: 3682

Here is a http://foodforcode.com/how-to-bypass-ssl-validation-for-exchange-webservices-managed-api about how I got around to do it real simple...

Upvotes: 3

Tanner
Tanner

Reputation: 22743

It's difficult to diagnose without knowing more about your scenario, but you might want to experiment with the following setting that can be used in client config to bypass the certificate validation process:

        <serviceCertificate>
          <authentication certificateValidationMode="None"
                          revocationMode="NoCheck" />
        </serviceCertificate>

Upvotes: 0

Related Questions