I have a WCF Service Application which will be deployed through IIS.
The development URL for the service is http://localhost:42543/Loyalty.svc, however when it is published to the web server the url will be http://ServerName:1066/Loyalty.svc .
However, when I navigate to the URL i get the following error:
Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http].
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http].
The web.config for the site is here:
<system.serviceModel>
<bindings>
<wsHttpBinding>
<binding name="wsSecureBinding">
<security mode="TransportWithMessageCredential">
<message clientCredentialType="UserName"/>
<transport clientCredentialType="None" proxyCredentialType="None" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="default" name="IISService.Loyalty">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsSecureBinding" name="secureService" contract="IISService.ILoyalty"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="default">
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
<serviceCredentials>
<userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="IISService.SecurityValidation, IISService"/>
</serviceCredentials>
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
I am also using the basic transport secuirty model as outlined here http://www.c-sharpcorner.com/UploadFile/manas1/implementing-username-password-security-in-wcf-service/.
Thanks in advance for your help.