【问题标题】:how to host WCF Duplex service on internet如何在 Internet 上托管 WCF Duplex 服务
【发布时间】:2013-03-24 11:30:14
【问题描述】:

我有一个带有 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>

【问题讨论】:

  • "locally" 和 IIS 对您来说似乎是两个不同的东西,您是否尝试将其托管在您的 PC 上 在 IIS 中 以查找问题?
  • 发布您的配置会有所帮助。
  • @nvoigt 是的,它可以在我们的开发服务器 IIS 上运行,但是一旦我将它部署到我们的公司网络之外,我就会遇到问题
  • @christiandev 我已经用配置更新了问题。

标签: c# wcf iis duplex


【解决方案1】:

上周我遇到了同样的问题。我删除了这一行 它运行良好。你可以试试

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-05-17
    • 2014-08-31
    • 2011-11-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多