I have a WCF service which works as rest and soap. I am trying to receive requests via HTTPS protocol but I can't no matter what I've tried.
I've tried to modify the web.config file according to this post:
How to enable HTTPS in WCF service
I've tried couple of other similar methods I've found on the web. But no matter I do, I always get: "Could not find a base address that matches scheme http for the endpoint with binding WSHttpBinding. Registered base address schemes are [https]." error upon running the project on debug mode.
My configuration is as follows:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="SendEmailSoap" />
<binding name="SendSMSSoap" />
<binding name="KPSPublicSoap">
<security mode="Transport" />
</binding>
<binding name="KPSPublicSoap1" />
</basicHttpBinding>
<webHttpBinding>
<binding name="WebBinding">
<security mode="None">
<transport clientCredentialType="None" />
</security>
</binding>
</webHttpBinding>
<wsHttpBinding>
<binding name="WsBinding">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="servicebehaviors">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
<behavior name="integrationServiceBehaviour">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="false" />
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="KaporaWebService.App_Code.CustomValidator, App_Code" />
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service behaviorConfiguration="integrationServiceBehaviour" name="KaporaWebService.IntegrationService">
<endpoint address="/ws" binding="wsHttpBinding" bindingConfiguration="WsBinding" contract="KaporaWebService.IIntegrationService" />
<endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" bindingConfiguration="WebBinding" contract="KaporaWebService.IIntegrationService" />
</service>
</services>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="false" />
</system.serviceModel>
What do I need to do enable HTTPS on WCF?