TNA
TNA

Reputation: 616

Enable SSL on WCF. What is required to be done on Client Side?

I want to enable SSL on WCF and what is required to be done on the WCF client side?

I found out that I can do as below.

BasicHttpBinding b = new BasicHttpBinding();
b.Security.Mode = BasicHttpSecurityMode.Transport ;
b.Security.Transport.ClientCredentialType = HttpClientCredentialType.Windows. 

But How about the client side? Thanks.

Edit : WCF is hosted on IIS and my wpf application will use this. Client will install this application on his/her PC.

Upvotes: 3

Views: 524

Answers (2)

Rory Primrose
Rory Primrose

Reputation: 633

As far as the client is concerned, it must follow the same WCF ABC's as the server. The Address, Binding and Contract must all match in order for the client to talk to the service. As Ladislav has said, further configuration will be required on the server for the SSL cert. Nothing else should be required for the client assuming that the client will be able to validate the chain of trust on the certificate.

Upvotes: 2

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364269

Nothing is needed on the client side if the client is generated from WSDL exposed on your service. Otherwise you can use same binding configuration. The only needed thing is configuring a certificate. If you don't have a certificate for HTTPS issued by authority which your clients trust to you must distribute the certificate and install it to Trusted People certificate store on your clients. Also be aware that clients must be part of your network domain when using Windows integrated authentication.

Upvotes: 2

Related Questions