1

WP 仅支持 basicHttpBinding。我的应用程序通过 WCF 发送敏感数据并将它们存储在数据库中。数据以纯文本形式发送,这是不可接受的。我找到了一些解决方案,但它不起作用。我已将 securityMode 设置为 Transport,但出现异常。这是我的 web.config 文件:

<system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="serviceBehavior">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <basicHttpBinding>
      <binding name="baseBinding" >
          <security mode="Transport" />
      </binding>
  </basicHttpBinding>
</bindings>
<services>
  <service behaviorConfiguration="serviceBehavior" name="TestWCF.WcfNotificationService.WcfNotificationService">
    <endpoint address="base" binding="basicHttpBinding" bindingConfiguration="baseBinding"
      contract="TestWCF.WcfNotificationService.IWcfNotificationService" />
    <host>
      <timeouts openTimeout="00:05:00" />
    </host>
  </service>
</services>

当我在客户端更新服务参考时出现错误:

找不到与绑定 BasicHttpBinding 的终结点的方案 https 匹配的基地址。注册的基地址方案是 [http]。

你能帮我吗,我该怎么办?谢谢

4

0 回答 0