i went through some previous questions, but i think am missing somewhere, As WCF is totally new for me.
web.config in WCF service application
<service behaviorConfiguration="BehaviourName" name="ProjectName.ServiceName">
<endpoint address="" binding="basicHttpBinding" contract="ProjectName.IServiceName">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
<host>
<baseAddresses>
<add baseAddress="https://aaa.bbbbbb.com/IISDeployedFolderName"/>
</baseAddresses>
</host>
</service>
....................
.....................
<behavior name="BehaviourName">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
............................
..........................
<basicHttpBinding>
<binding name="secureHttpBinding">
<security mode="Transport">
<transport clientCredentialType="None" proxyCredentialType="None" realm=""/>
<message clientCredentialType="Certificate" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
..........................
.........................
<protocolMapping>
<add binding="basicHttpBinding" scheme="https" />
</protocolMapping>
............................
..............................
In MVC application, other application am consuming above code service.
added service reference with default settings and automatically generated endpoint address with http, if i change it to https it's breaking with error.
In WCF, we should configure an extra service endpoint for
HTTPSprotocol, which requires the transport layer security mode.The below configuration supports both HTTP protocol and HTTPS protocol.
We could also use
ProtocolMappingsection to simplify the configuration. The below configuration support both HTTP and HTTPS protocol.Official document.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/simplified-configuration
Feel free to let me know if there is anything I can help with.