web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

CRM web service timeouts on workflow activites

(0) ShareShare
ReportReport
Posted on by

I'm on CRM online 2015 and using workflow activities to call my custom web services. This takes about 10 minutes to return a response for some of the service methods. I'm adding enough time, but CRM online keeps timing out. Code is below: 

BasicHttpBinding myBinding = new BasicHttpBinding();
myBinding.Name = "BasicHttpBinding_MyService";
myBinding.OpenTimeout = new TimeSpan(0, 20, 0);
myBinding.CloseTimeout = new TimeSpan(0, 20, 0);
myBinding.SendTimeout = new TimeSpan(0, 20, 0);
myBinding.ReceiveTimeout = new TimeSpan(0, 20, 0);
myBinding.Security.Mode = BasicHttpSecurityMode.None;
myBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
myBinding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.None;
myBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
EndpointAddress endPointAddress = new EndpointAddress(strServiceURL);
using (MyServiceClient client = new MyServiceClient(myBinding, endPointAddress))
{
response = client.CreateContact("Testing");
}

Any other way to increase the length of time to wait for a response? 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    ScottDurow Profile Picture
    21 on at

    Hi Vankat,

    Unfortunately, CRM Online does not allow a workflow activity to run for more than 2 minutes before timing out and there is no way of increasing this. I suggest that you change the webservice call so that it quickly returns a correlation token then you can then call again to get the response after a workflow wait. So your activity would be split into two - the first would call the service and return quickly, then the second would get the response using the correlation token returned from the first call. You can suspend a workflow in a wait condition for 10 minutes inbetween these two calls.

    Hope this helps

  • Community Member Profile Picture
    on at

    Thanks sounds like a plan, do you recommend any online samples for this?

  • ScottDurow Profile Picture
    21 on at

    Hi Venkat,

    Sorry I've not got any samples for this - but if you are already calling the service it should be pretty much the same - you'll need to change the webservice that you are calling the most.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans