Using SSL with WP7, WCF service and Azure
I'm trying to connect to my azure WCF service using an SSL certificate. I've seen a good few tutorials talking about changing the 'binding' properties in the web.config file but the tutorial I followed results in this not being possible (as far as I can see):
The data in my Azure database is exposed using my Azure hosted WCF service and at the moment, the connection string contains sensitive data.
Using my SSL certificate (I recently purchased a wildcard SSL certificate) I'd like to connect to my Azure hosted WCF service from my WP7 app.
Essentially I'm looking for some guidance:
- How do I setup the SSL connection between my WP7 app and my Azure hosted WCF service so that only users of the app can access the service?
You'll need to do a few things:
- Configure both the client (WP7) and the server (WCF service) to use the basicHttpBinding with Security mode set to Transport. This will allow you to use an HTTPS endpoint.
<system.serviceModel> <bindings> <basicHttpBinding> <binding allowCookies="True"> <security mode="Transport" /> </binding> </basicHttpBinding> </bindings> </system.serviceModel>
- Upload the certificate in your cloud service through the portal.
- Add an HTTPS endpoint referencing the certificate (through the thumbprint) in the Web Role (csdef and cscfg).
- Map a CNAME to your cloudapp address that matches the wildcard domain defined in your certificate.