如何在互联网上托管WCF双工服务

时间:2013-03-24 11:30:15

标签: c# wcf iis duplex

我有一个带有WSDualHttpBinding的WCF服务,该服务在本地工作正常,当我在IIS上它不能正常工作时,首先它要求登录凭据在绑定上没有设置身份验证,但是我设置现在安全模式为none,当我从客户端发出请求时,它只是等待等待并等待响应并超时。

任何建议或示例都将受到赞赏。

<system.serviceModel>
    <services>
      <service name ="NewEngine.Engine" behaviorConfiguration ="serviceBehaviourSoap" >
        <endpoint name ="duplexendpoint" address ="" binding ="wsDualHttpBinding" contract ="NewEngine.IEngine" bindingConfiguration="wsDualBinding"/>
        <endpoint name ="MetaDataTcpEndpoint" address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="serviceBehaviourSoap">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <bindings>
      <wsDualHttpBinding>
        <binding name="wsDualBinding" closeTimeout="00:00:05" openTimeout="00:00:05" receiveTimeout="00:10:00" sendTimeout="00:00:05" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true">
          <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
              maxBytesPerRead="4096" maxNameTableCharCount="16384" />
          <reliableSession ordered="true" inactivityTimeout="00:10:00" />
          <security mode="None" >
            <message clientCredentialType="None"/>
          </security>
        </binding>
      </wsDualHttpBinding>
    </bindings>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
  </system.serviceModel>

1 个答案:

答案 0 :(得分:0)

我上周遇到了同样的问题。我删除了这一行&lt; message clientCredentialType =“None”/&gt;它运作良好。你可以试试吗

相关问题