0

我正在编写一个需要双工通道的 WCF 服务。我在本地主机上运行它没有问题,但是当部署到它要驻留的服务器进行测试时,我收到超时错误(他的请求操作发送到http://www.foo.com/myService.svc没有收到在配置的超时时间内回复 (00:04:59.1049488))。我已将超时时间提高到 30 分钟,但仍然在服务器上收到错误消息。这让我相信这不是操作超时,而是某种通信错误。

我的服务配置:

<system.serviceModel>
    <bindings>
        <wsDualHttpBinding>
            <binding name="wsDualHttpBinding">
            </binding>
        </wsDualHttpBinding>
    </bindings>
    <services>
        <service name="myService.myService" behaviorConfiguration="wsDualHttpBinding">
            <endpoint address=""
                      contract="myService.IMyService"
                      binding="wsDualHttpBinding"
                      bindingConfiguration="wsDualHttpBinding" />
        </service>
    </services>
    <behaviors>
        <serviceBehaviors>
            <behavior name="wsDualHttpBinding">
                <serviceMetadata httpsGetEnabled="true" httpGetEnabled="true"/>
                <serviceDebug includeExceptionDetailInFaults="true" />
            </behavior>
        </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="wsDualHttpBinding" scheme="https" bindingConfiguration="wsDualHttpBinding" />
    </protocolMapping>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>

我的客户端配置:

<system.serviceModel>
    <bindings>
        <wsDualHttpBinding>
            <binding name="WSDualHttpBinding_IBulkFiling" openTimeout="00:05:00" sendTimeout="00:05:00" />
        </wsDualHttpBinding>
    </bindings>
    <client>
        <endpoint address="http://www.foo.com/myService.svc" binding="wsDualHttpBinding"
            bindingConfiguration="WSDualHttpBinding_IMyService" contract="myService.myService"
            name="WSDualHttpBinding_IMyService">
            <identity>
                <userPrincipalName value="host\Server02" />
            </identity>
        </endpoint>
    </client>
</system.serviceModel>

几天来我一直试图破译这个问题,但没有取得任何进展。任何帮助,将不胜感激。

4

0 回答 0