Hi,
I have a workflow that is hosted in my development environment SharePoint site, and in an integration server.
They both consume the same external WCF Service in our network. However, once in a while (1 out of 100 retry), the workflow in the integration server is unable to reach the service and I got this exception:
System.TimeoutException: The request channel timed out while waiting for a reply after 00:01:00. 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. ---> System.TimeoutException: The HTTP request to 'https://linktoservice.com/.svc?wsdl' has exceeded the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace --- at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) --- End of inner exception stack trace ---
What is strange is, the workflow tries to consume the service 3 times. The workflow in my environment machine works without any problem at first try...
However, for the integration server, It happens that it can reach the service at the second times, and sometimes it can't either for the 3 retries... It usually happen when the workflow didnt consume the service for a while...
private void GetInfo()
{
ServiceClient client = null;
_retrieveOk = false;
int retryCount = 0;
while (!_retrieveOk)
{
try
{
client = new ServiceClient();
_rcvIncfo = client.GetInfo(val);
_retrieveOk = true;
client.Close();
}
catch (Exception ex)
{
if (client != null)
{
client.Abort();
}
retryCount++;
LogComment(String.Format("Problem while retrieving Info... Attempt {0}", retryCount));
if (retryCount == 3)
{
LogComment(ex.Message);
break;
}
}
}
}Usually, when the workflow manages to consume the service at the 2nd time, I can see at the log of the WCF that the workflow didnt reach the service at the first time (no log for the time when it should be consumed), but there is a log for the 2nd attempt...