How do you secure a Silverlight-Enabled WCF Web Service with SSL? I have tried setting it up similar to a regular WCF service secured by SSL, but it doesn\'t seem to work. Wha
There are three key places that I configure to use https in my own apps.
Web.config
In the behavior tag include this line:
For the MEX endpoint, make sure you use the https protocol:
Create a custom binding. The important part is the transport security:
You can also include the usual authorization stuff:
Silverlight
On the Silverlight end, either point the ServiceReference at the now secure service, or set up the connections manually in code. the ServiceReferences.ClientConfig file should have the security stuff in it:
And the code version looks like this:
BasicHttpBinding b = new BasicHttpBinding(BasicHttpSecurityMode.Transport);
There are probably more complex things that can be done, but this should be good enough for most people.