1
votes

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):

http://www.silverlightshow.net/items/Producing-and-Consuming-OData-in-a-Silverlight-and-Windows-Phone-7-application-Part-4.aspx

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?

Thanks!

1

1 Answers

1
votes

You'll need to do a few things:

  1. 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>  
  1. Upload the certificate in your cloud service through the portal.
  2. Add an HTTPS endpoint referencing the certificate (through the thumbprint) in the Web Role (csdef and cscfg).
  3. Map a CNAME to your cloudapp address that matches the wildcard domain defined in your certificate.