1

我有一个 wcf 服务,用户可以通过它聊天。当我在本地 IIS 中测试它时它可以工作,但是当它在外部服务器中发布并调用一个方法时,它会抛出:

安全协商失败,因为对方没有及时回复。这可能是因为底层传输连接已中止。

webconfig.conf

....

<system.serviceModel>
    <bindings>
      <wsDualHttpBinding>
        <binding name="bind" textEncoding="utf-8">
          <security mode="None" />
        </binding>

      </wsDualHttpBinding>

    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="svcbh">
          <serviceMetadata httpGetEnabled="False" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>

    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
    <services>

      <service name="QasedakServer.QasedakAPI" behaviorConfiguration="svcbh">

        <host>

          <baseAddresses>
            <add baseAddress="http://www.mywebsite.com/" />
          </baseAddresses>
        </host>
        <endpoint name="duplexendpoint" address="" binding="wsDualHttpBinding" contract="QasedakServer.IQasedakAPI" bindingConfiguration="bind" />
        <endpoint name="MetaDataTcpEndpoint" address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />

      </service>
    </services>
  </system.serviceModel>

....

我的程序使用双通道模式连接。请帮助我。

4

0 回答 0