【问题标题】:WCF Timeout - WSDualHttpBinding, How to set OperationTimeoutWCF 超时 - WSDualHttpBinding,如何设置 OperationTimeout
【发布时间】:2017-12-07 12:10:05
【问题描述】:

我正在创建一个 WSDualHttpBinding(从代码),设置以下超时值:

 peerBinding.CloseTimeout = TimeSpan.FromSeconds(ServiceConnector_Constants.CLOSETIMEOUT);
            peerBinding.OpenTimeout = TimeSpan.FromSeconds(ServiceConnector_Constants.OPENTIMEOUT);
            peerBinding.SendTimeout = TimeSpan.FromSeconds(ServiceConnector_Constants.SENDTIMEOUT);

这些常数(出于恼怒目的)值为 600 秒。

一个客户端连接正常,其他客户端记录以下错误:

“打开操作未在分配的超时时间 00:01:00 内完成”

这是在以下代码行:

                            _clientFactory.Open();

                        //Log(String.Format("Create Client IN 6"));
                        LogMessage("Creating client...");
                        _serviceConnection = _clientFactory.CreateChannel();
                        LogMessage("Client Created...");

最后记录的行是“Creating Client”。看来是 CreateChannel 引起了问题。

但我已将值设置为 > 1 分钟。无论我设置什么值,超时都是 总是报告为 00:01:00!!

我不明白。

我已经阅读并阅读了有关此内容和 OperationTimeout 属性的信息。但无论如何我都找不到在 WSDualHttpBinding 上设置它。

谁能帮忙。

谢谢

【问题讨论】:

    标签: wcf wsdualhttpbinding


    【解决方案1】:

    解决方案不是按照这个出色的 SO 解决方案中的建议使用 wsDualHTTPBinding :why NOT to use wsDualHttpBinding in client/server

    现在世界上一切都很好 - 而且速度更快。

    【讨论】:

      猜你喜欢
      • 2011-09-07
      • 1970-01-01
      • 2010-11-02
      • 2010-10-04
      • 2020-10-13
      • 1970-01-01
      • 2014-05-30
      • 2013-05-18
      • 1970-01-01
      相关资源
      最近更新 更多