Anyone know how to catch timeout exception in Plugins? I am aware of 2min execution time allocated for each operation.
*This post is locked for comments
have a look on the below :
msdn.microsoft.com/.../gg327884.aspx
Hi
Please refer the below post on how to catch timeout exception.
www.inogic.com/.../fault-and-exception-handling-in-dynamics-crm-2011
Hi,
Please look at below MSDN link.
Mansoor
Hi Mihir,
You can implement below code for this -
try { try { // Your code here } catch (WebException exception) { string str = string.Empty; if (exception.Response != null) { using (StreamReader reader = new StreamReader(exception.Response.GetResponseStream())) { str = reader.ReadToEnd(); } exception.Response.Close(); } if (exception.Status == WebExceptionStatus.Timeout) { throw new InvalidPluginExecutionException( "The timeout elapsed while attempting to issue the request.", exception); } throw new InvalidPluginExecutionException(String.Format(CultureInfo.InvariantCulture, "A Web exception occurred while attempting to issue the request. {0}: {1}", exception.Message, str), exception); } } catch (Exception e) { tracingService.Trace("Exception: {0}", e.ToString()); throw; }
You can also refer below msdn reference .
msdn.microsoft.com/.../gg509030.aspx
Hope this helps.
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
UllrSki 2
ED-30091530-0 1