I am trying to configure a WCF service hosted using windows service on https.
The service works with http but does not seem to work on https.
Configuration file (works for http):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<serviceHostingEnvironment aspNetCompatibilityEnabled="false" />
<!-- Set up Custom Behaviors -->
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehavior">
<serviceMetadata httpGetEnabled="true" httpsGetUrl="true" />
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<!-- Set up the binding configuration -->
<bindings>
<wsHttpBinding>
<binding name="HttpsSOAPBinding">
<security mode="Transport">
<transport clientCredentialType="None"/>
</security>
</binding>
<binding name="HttpSOAPBinding">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<services>
<service name="Microsoft.ServiceModel.Samples.CalculatorService"
behaviorConfiguration="CalculatorServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://server_name:8080/ServiceModelSamples/service"/>
</baseAddresses>
</host>
<endpoint address=""
binding="wsHttpBinding"
bindingConfiguration="HttpSOAPBinding"
contract="Microsoft.ServiceModel.Samples.ICalculator" />
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
</configuration>
I changed the following settings for https:
- Change wsHttpBinding endpoint binding configuration to HttpsSOAPBinding
- Change base address to https://server_name:8080/ServiceModelSamples/service"
- Change mex endpoint binding to mexHttpsBinding
I have also attached port 8080 to ssl certificate.
netsh http show sslcert
IP:port : 0.0.0.0:8080
Certificate Hash : 12ea34b0e1e46b12346ae04834cf1deaefb52f33
Application ID : {cba53ac4-6ecf-4a49-8aq3-z6c61e2ce9a1}
Certificate Store Name : (null)
Verify Client Certificate Revocation : Enabled
Verify Revocation Using Cached Client Certificate Only : Disabled
Usage Check : Enabled
Revocation Freshness Time : 0
URL Retrieval Timeout : 0
Ctl Identifier : (null)
Ctl Store Name : (null)
DS Mapper Usage : Disabled
Negotiate Client Certificate : Disabled
Is there anything missing?