我正在创建一个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上设置它的方法。
有谁能帮帮忙。
谢谢
发布于 2017-12-08 04:32:54
解决方案不是按照这个优秀的SO解决方案中的建议使用wsDualHTTPBinding :why NOT to use wsDualHttpBinding in client/server
现在,世界上一切都很好--而且速度更快。
https://stackoverflow.com/questions/47694853
复制相似问题