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

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

(1) ShareShare
ReportReport
Posted on by

Hi friends,

I am trying to develop a program using CRM web API. Everything goes find except the http request suddenly has error as below

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

After testing the URL through my browser, I found it worked well, so it seems the problem may not on the server side. My request is quite simple like as below, which is followed the msdn crm web api tutorial.

 request    

{Method: GET, RequestUri: 'organization.crm5.dynamics.com/.../some detail filter', Version: 1.1, Content: <null>, Headers:
{
  Prefer: odata.maxpagesize=10
  Prefer: odata.include-annotations=OData.Community.Display.V1.FormattedValue
  OData-MaxVersion: 4.0
  OData-Version: 4.0
  Accept: application/json
}} 


My concern is the request worked well in the past but crashed these two days. Is any update from Microsoft affect the api parameters like version? Any hints and suggestion is welcomed. Thanks a lot!

*This post is locked for comments

I have the same question (1)
  • Community Member Profile Picture
    on at
    RE: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    Hi Samuel,

    did you find an answer for your issue under community.dynamics.com/.../263018 ? I am experiencing the same issue now.

    Thanks.

    Tomas

  • Community Member Profile Picture
    on at
    RE: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    I am also having the same problem. Have you found a fix to this? These API are so unreliable without any formal updates published in public forums. I am wondering if this is affecting all Prod and Staging instances elsewhere.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    Finally, I found the fix for the issues. I enabled TLS. I added following likes before call D365 API:

               const SslProtocols _Tls12 = (SslProtocols)0x00000C00;

               const SecurityProtocolType Tls12 = (SecurityProtocolType)_Tls12;

               ServicePointManager.SecurityProtocol = Tls12;

  • Verified answer
    tw0sh3ds Profile Picture
    5,600 on at
    RE: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    You are probably using wrong TLS:

    blogs.msdn.microsoft.com/.../updates-coming-to-dynamics-365-customer-engagement-connection-security

    It's very important to change to TLS 1.2

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans