[英]WCF Timeout - WSDualHttpBinding, How to set OperationTimeout
我正在创建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...");
最后记录的行是“正在创建客户端”。 看来是CreateChannel引起了问题。
但我将值设置为> 1分钟。 无论我设置什么值,超时总是报告为00:01:00!
我不明白
我已经阅读并阅读了有关此内容和OperationTimeout属性。 但是我还是找不到在WSDualHttpBinding上设置它的方法。
谁能帮忙。
谢谢
解决方案是不按照此出色的SO解决方案中的建议使用wsDualHTTPBinding: 为什么不在客户端/服务器中使用wsDualHttpBinding
现在世界上一切都很好-并且速度更快。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.