1

我有一个带有 WSDualHttpBinding 的 WCF 服务,该服务在本地运行良好,当我在 IIS 上托管它时它不起作用,首先它要求登录凭据,而绑定上没有设置身份验证,但是我设置了他的安全模式现在当我从客户端发出请求时,它只是等待等待响应并超时。

任何建议或示例将不胜感激。

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

1 回答 1

0

我上周遇到了同样的问题。我删除了这一行 < message clientCredentialType="None" /> 它运行良好。你可以试试

于 2014-03-17T12:02:26.730 回答