简体   繁体   中英

Could not find a base address that matches scheme https for the endpoint with binding WSHttpBinding. Registered base address schemes are [http].

I have done following configuration inside configuration file for wsHttpBinding and with transport security. Meta data exchange, base address & bindings all are set for Https but it is still giving this issue.

<system.serviceModel>    
    <bindings>      
  <wsHttpBinding>
            <binding name="WsHttpEndpointBinding">
                <security mode="Transport">
                    <transport clientCredentialType="None"/>
                </security>
            </binding>
        </wsHttpBinding>
    </bindings>
    <services>
        <service behaviorConfiguration="WCFWindowsBasicHttpBinding.Service1Behavior" name="WCFWindowsBasicHttpBinding.Service1">
            <endpoint address="" binding="wsHttpBinding" bindingConfiguration="WsHttpEndpointBinding" name="WsHttpEndpoint" contract="WCFWindowsBasicHttpBinding.IService1">
                <identity>
                    <dns value="localhost"/>
                </identity>
            </endpoint>

    <endpoint address="Mex" binding="mexHttpsBinding" contract="IMex"></endpoint>

    <host>
      <baseAddresses>
        <add baseAddress="https://localhost/Service1.svc"/>
      </baseAddresses>
    </host>

        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="WCFWindowsBasicHttpBinding.Service1Behavior">
                <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
                <serviceMetadata httpGetEnabled="false" />
                <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
                <serviceDebug includeExceptionDetailInFaults="false"/>
            </behavior>
        </serviceBehaviors>
    </behaviors>
</system.serviceModel>

Are you hosting the service on IIS? If so, make sure the WebSite you're deploying to has an SSL Binding defined in IIS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM