Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Unable to connect to the remote server <ErrorCode>-2147220891

(0) ShareShare
ReportReport
Posted on by

Hi, i'm using Crm online, 
I have a plugin that is executed with the change of state, which creates connects to a rest, when change of state I generate general error "Unable to connect to the remote server", the credentials used in the rest were validated in soap and works correctly: 

Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: Plugins_IntegracionSGI: Unable to connect to the remote serverDetail:

<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>47b8b09f-9756-478a-bd58-b94a98f3744d</ActivityId>
<ErrorCode>-2147220891</ErrorCode>

<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic">

<KeyValuePairOfstringanyType>

<d2p1:key>OperationStatus</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">0</d2p1:value>

</KeyValuePairOfstringanyType>
<KeyValuePairOfstringanyType>

<d2p1:key>SubErrorCode</d2p1:key>
<d2p1:value xmlns:d4p1="www.w3.org/.../XMLSchema" i:type="d4p1:string">-2146233088</d2p1:value>

</KeyValuePairOfstringanyType>

</ErrorDetails>

<Message> Plugins_IntegracionSGI: Unable to connect to the remote server</Message>
<Timestamp>2019-06-21T15:14:58.4604974Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

[Plugins_IntegracionSGI: Plugins_IntegracionSGI.Plugins_IntegracionSGI]
[9217744e-38c0-e811-a970-000d3ac1bbe7: Plugins_IntegracionSGI.Plugins_IntegracionSGI: Update of ap_licitacion]
Starting sync workflow '[SE - 15] Registrar bitácora de cambio de estado para licitación', Id: 1fc0ff8c-07f8-e811-a976-000d3ac1b8d2
Sync workflow '[SE - 15] Registrar bitácora de cambio de estado para licitación' completed successfully

</TraceText>
</OrganizationServiceFault>

*This post is locked for comments

  • Suggested answer
    _Lars_ Profile Picture
    _Lars_ 225 on at
    RE: Unable to connect to the remote server <ErrorCode>-2147220891

    This might not be the correct forum to address this problem. The plugin is working find, but your external resource is not allowing access due to invalid authentication. I would start with Postman and create the same query to the external service. Get it up and running in Postman and you'll figure it out.

    A tip for Postman is that once you have your query up and running you can use it to generate C# for instance. At least see what headers to set to help you create a proper request from the plugin.

  • Suggested answer
    Kokulan Profile Picture
    Kokulan 18,052 on at
    RE: Unable to connect to the remote server <ErrorCode>-2147220891

    Hi

    The most likely cause of this error is that CRM is not able to reach the REST endpoint service.  Where does your REST endpoint live?

    You might have to update the Firewall / Proxy servers to allow the incoming request from CRM Online.

    You will have to liaise with your IT team to allow the CRM Online IP to access the REST endpoint.

    If you would like to know which IPs should be whitelisted, please visit the link below.  

    www.microsoft.com/.../details.aspx

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 231,430 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans