Could not find a base address that matches scheme http for the endpoint with binding Metadata Exchange Http Binding.

1070 ワード

Could not find a base address that matches scheme http for the endpoint with binding Metadata Exchange Http Binding.Registed base address schemes are[https].
 
The base address for your service defines「HTTPS:/」-but your mex address is「HTTP」.
If you want your service to use https://,you'll need to use the mexhttpsBinding as well:
 
<services>
      <service name="MyWCFService"
                behaviorConfiguration="mexServiceBehavior">
        <host>
          <baseAddresses>
            <add baseAddress="https://localhost:9090/MyService"/>
          </baseAddresses>
        </host>
        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="MyBinding" contract="IMyService"/>
        <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
      </service>
</services>