1

我正在尝试通过 https 设置 WCF 服务。但是我不断收到错误消息:“找不到与具有绑定 BasicHttpBinding 的端点的方案 https 匹配的基地址。注册的基地址方案是 [http]。”

这是我的 web.config 文件的内容:

<?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> 

关于我做错了什么的任何想法?

4

1 回答 1

1

我希望这至少有一个 MyService.svc 值。

<endpoint address="" binding="basicHttpBinding" 
  bindingConfiguration="StreamedHttp" contract="SoftwareMyService.IMyService" />
于 2012-04-18T20:52:06.417 回答