简体   繁体   中英

Error trying to set up WCF service over https

I am trying to set up a WCF service over https. However I keep getting the error: "Could not find a base address that matches scheme https for the endpoint with binding BasicHttpBinding. Registered base address schemes are [http]."

Here is the content of my web.config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    ...
<behaviors>
  <serviceBehaviors>
    <behavior name="MyServiceBehavior">
      <serviceMetadata httpsGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<services>
  <service name="SoftwareMyService.MyService" behaviorConfiguration="MyServiceBehavior">
    <host>
      <baseAddresses>
        <add baseAddress="https://........./" />
      </baseAddresses>
    </host>
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="StreamedHttp" contract="SoftwareMyService.IMyService" />
    <endpoint address="mex" binding="mexHttpsBinding" contract="IMetadataExchange" />
  </service>
</services>
<bindings>
  <basicHttpBinding>
    <binding name="StreamedHttp" transferMode="Streamed" maxReceivedMessageSize="2147483647">
      <security mode="Transport">
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration> 

Any ideas on what I'm doing wrong?

I would expect that this shuold at least have a MyService.svc value.

<endpoint address="" binding="basicHttpBinding" 
  bindingConfiguration="StreamedHttp" contract="SoftwareMyService.IMyService" />

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