SmartConnector Forum
Schneider Electric support forum about SmartConnector applications for integration of other building management systems (BMS) into EcoStruxure Building Operation.
Link copied. Please paste this link to share this article on your social media post.
I am using the EWS library in my program. I am receiving this error for some of my AS devices when I try to get the EWS Client.
GetEwsClient has an exception for http://xx.xxx.xx.xxx/EcoStruxure/DataExchange. The request channel timed out while waiting for a reply after 00:29:56.9976998. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout.. The HTTP request to 'http://xx.xxx.xx.xxx/EcoStruxure/DataExchange' has exceeded the allotted timeout of 00:30:00. The time allotted to this operation may have been a portion of a longer timeout.
I noticed that I can pass my own EwsBindingConfig to this method to overwrite the default timeout. The intellisense only says it takes a double but does not tell if represents seconds or minutes.
Is it timeout seconds or minutes?
Link copied. Please paste this link to share this article on your social media post.
Maneesh,
All timeout values are in seconds.
If you use the overloaded constructor for EwsClient which allows you to supply your own binding config I would recommend also using the static EwsClient.DefaultBindingConfig to retrieve the default binding and then update only those properties you need to.
Link copied. Please paste this link to share this article on your social media post.
Maneesh,
All timeout values are in seconds.
If you use the overloaded constructor for EwsClient which allows you to supply your own binding config I would recommend also using the static EwsClient.DefaultBindingConfig to retrieve the default binding and then update only those properties you need to.
Link copied. Please paste this link to share this article on your social media post.
Beyond what Mark has said, it might be worth debugging exactly why you are timing out as well, while changing the default binding config may 'hide' the issue, if SBO is taking over 30 seconds to respond to an EWS request, this is worth noting as it may be a sign of an overloaded system.
Link copied. Please paste this link to share this article on your social media post.
Actually, the default timeout as described above is 30 minutes (not seconds).
Regardless, Jeff makes a very valid case. Are you seeing timeouts that are shorter? If so, then it's not the client that's timing out and changing the value wouldn't matter.
Link copied. Please paste this link to share this article on your social media post.
I'm probably confusing matters. The timeout property values on the binding is in seconds but the default timeout is actually 1800 (which is 30 minutes worth of timeout).
Link copied. Please paste this link to share this article on your social media post.
Hi Mark,
I could not find the DefaultBindingConfig on the EwsClient.
Could you please share a code snippet?
Link copied. Please paste this link to share this article on your social media post.
What NuGet version are you using?
Link copied. Please paste this link to share this article on your social media post.
I have 1.3.45. I will update to the latest and see if that makes a difference. Thanks!
Link copied. Please paste this link to share this article on your social media post.
That worked. Had to update Ews.Client to the latest (v2.1.83) and here is the code.
private static EwsBindingConfig _ewsBindingConfig = EwsClient.DefaultBindingConfig;
// all in seconds
_ewsBindingConfig.SendTimeout = 60;
try
{
var credentials = new EwsSecurity
{
AuthenticationScheme = AuthenticationSchemes.Digest,
Username = username,
Password = password
};
return new EwsClient(credentials, url, _ewsBindingConfig);
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.