Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

API Call to send email through third party vendor failing with HTTPWebRequest Timeout error in our workflow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

We have a workflow which checks a few conditions and then executes a custom workflow activity plugin. That plugin calls an external API to send out emails. The worklfow is failing with a timeout error. After further research we found out that it is timing out in our end . We added a timeout setting in our code and that did not help. How can we increase the timeout in the CRM server itself? Our organization is On-Prem, 8.2. 

*This post is locked for comments

  • Suggested answer
    PranavShroti Profile Picture
    PranavShroti 4,510 on at
    RE: API Call to send email through third party vendor failing with HTTPWebRequest Timeout error in our workflow

    Hello,

    You can try few things: All will contribute:

    Maximum allowed content length

    1. Open IIS manager | Expand “Sites” | Click on “Microsoft Dynamics CRM” | On the right pane under section “IIS”, double click on “Request Filtering”.

    2. Now on right pane, click on “Edit Feature Settings…”

    3. Put the value for “Maximum allowed content length (Bytes)” as “60000000” | Click “OK”

    maxRequestLength

    1. Open IIS manager | Expand “Sites” | Right Click on “Microsoft Dynamics CRM” and Click “Explore”. (This will open CRM website root folder)

    2. Now in that folder locate “Web.Config” file and open that in “Notepad” (open it only in notepad so that we avoid any formatting or corruption of the file. If necessary, take a backup of the file)

    3. Now search for string “maxRequestLength” | Change the value to “60000”. Search again, the “maxRequestLength” should be present in two areas in the web.config file – change all of them.

    4. Save the web.config file

    WCF Compression

    a. On the CRM Server Navigate to: C:WindowsSystem32InetsrvConfigapplicationHost.config and open it with notepad.

    b. Search for the Section: “<dynamicTypes>” and in that section you should fine an entry that looks like this:

    <add mimeType=”application/x-javascript” enabled=”true” />

    ., Below that, add the following line:

    <add mimeType=”application/soap+xml; charset=utf-8″ enabled=”true” />

    d. Save the file and reset IIS for the setting to take effect.

    Compression

    Open IIS

    Click on the Microsoft Dynamics CRM website

    Click on the Compression icon in the main page

    Verify you have checked the boxes

    Enable dynamic content compression

    Enable static content compression

    TCPTimedWaitDelay

    Key at: HKLM\System\CurrentControlSet\Services\TCPIP\Parameters

    decimal value of 30

    Hope this help !

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,468 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,287 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans