Running WCF Service as both HTTP and HTTPS

When trying to configure a WCF service to run as both a HTTP and HTTPS endpoint there are some differences to consider:

  1. HTTP uses SOAP 1.1
  2. HTTPS uses SOAP 1.2

This can cause issues with how your XML packets need to be generated with different SOAP Headers.

SSL Config

On the IIS Manager under the website there is a tile titled “SSL Settings”.
To run both HTTP and HTTPS ensure “Require SSL” is unticked

Web Config

If you want to allow people to generate a .wsdl file do not forget to set this in the web config in the service behaviours
[code]
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
[/code]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.