Sunday, May 10, 2020

ERROR REQUESTING ORGS FROM THE DISCOVERY SERVER


While connecting to Dynamic CRM recently from one of my C# console applications, I encountered this error. To my surprise this error was not persistent and instead it was intermittent meaning it was getting occur only at few times.
When I tried googling about it, I found this

This error message happens if one of your organization is corrupted. One example is an organization that has not been removed from Deployment Manager but has its database removed from SQL Server.

But now I was using Dynamic CRM online instance and I was able to browse my CRM well. The only question is why I am not able to make a connection from my C# console application.

I looked closely to my connection and found that I am making a connection using useUniqueInstance = true, which require a unique name of crm instance to be provided while making a connection.

CrmServiceClient crmSvc = new CrmServiceClient(crmUserId, CrmServiceClient.MakeSecureString(crmUserPassword), crmRegion, crmOrgUniqueName, useUniqueInstance: true, isOffice365: true);

Note: The unique organization name can be found on the developer page, in SETTINGS > customizations in Microsoft Dynamics CRM web application).

If you just want to provide the CRM instance name, which appears on your url, make the useUniqueInstance: false.


Here are some other links for Troubleshooting and learning:

·       Plugin in Dynamic 365 CRM

·       Connect to Dynamic 365 CRM from Console App using Azure Authentication

·       Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies

·       Unable to Login to Dynamics CRMOrganizationWebProxyClient is null

·       Assembly 'Microsoft.Crm.Sdk.Proxy' with identity 'Microsoft.Crm.Sdk.Proxy, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' uses 'Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Xrm.Sdk' with identity 'Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

·       Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

·       Could not load file or assembly 'Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies




No comments: