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 = n开发者_C百科ew 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.
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.
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.
精彩评论