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 :
Small and medium business | Business Central, N...
Unanswered

How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

(2) ShareShare
ReportReport
Posted on by

*** UPDATED 11 June 2021 *** Version 2

 

NOTE: PLEASE USE A TEST ENVIRONMENT FIRST AND TAKE NOTE OF THE STEPS. These are just 5 simple steps to manually enable a different version of XRM SDK that would skip URL validation through Regional Discovery Service and fall back to Global Discover Service.

 

PRE-REQUISITE:

You must have installed .NET 4.6.2 or a later .NET Framework version before moving forward with the following

LINK Download Microsoft .NET Framework 4.6.2 (programma di installazione offline) per Windows 7 SP1, Windows 8.1, Windows 10, Windows 10 November Update, Windows Server 2008 R2 SP1, Windows Server 2012 e Windows Server 2012 R2 from Official Microsoft Download Center

Below one of the typical errors that you might receive when deploying the new CRM SDK without installing .NET 4.6.2

pastedimage1623738214685v1.png 

(1) Download the CRM SDK package (it will download a nupkg file): Microsoft.CrmSdk.CoreTools

https://www.nuget.org/packages/Microsoft.CrmSdk.CoreTools/9.0.2.11

IMPORTANT: When you have downloaded nupkg file be sure to UNBLOCK it

 

pastedimage1623427299988v1.png

(2) Rename the file extension to .zip and unzip the file to a folder. The files we’re interested in are the dlls in content\bin\coretools folder.

(3) Stop NST 

 

(4) Pull 

Microsoft.Crm.Sdk.Proxy.dll

Microsoft.Xrm.Sdk.Deployment.dll

Microsoft.Xrm.Sdk.dll

Microsoft.Xrm.Tooling.Connector.dll

and copy them over the older versions in the NST folder (make a backup of the older versions of these DLLs of course) and also RTC folder (needed only in dev clients to run New-NAVCRMTable runs and finsql.exe compilations where these assemblies are referenced)

 

NST folders:

C:\Program Files\Microsoft Dynamics 365 Business Central\<version>\Service\DataSources\XrmV9

C:\Program Files\Microsoft Dynamics NAV<version>\Service

Client folders:

C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\<version>\RoleTailored Client

C:\Program Files (x86)\Microsoft Dynamics NAV\<version>\RoleTailored Client

NOTE: Pulling or replacing the DLL files in the Windows Client folder is only needed to run the New-NavCRTable cmdlet and/or to compile objects within CSIDE. This is typically done by developers using test workstations or workstations dedicated to develop code. These steps are not necessary to be done on end users workstations.

 

(5) In the following 3 config files

 

C:\Program Files\Microsoft Dynamics NAV\<version>\Service\Microsoft.Dynamics.Nav.Server.exe.config

C:\Program Files (x86)\Microsoft Dynamics NAV\<version>\RoleTailored Client\Microsoft.Dynamics.Nav.Client.exe.config

C:\Program Files (x86)\Microsoft Dynamics NAV\<version>\RoleTailored Client\Finsql.exe.config

 

add or change the following to the assemblyBindings:

<dependentAssembly>

 

         <assemblyIdentity name="Microsoft.Xrm.Sdk" publicKeyToken="31bf3856ad364e35"/>

 

          <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0"/>

 

</dependentAssembly>

<dependentAssembly>

 

         <assemblyIdentity name="Microsoft.Xrm.Tooling.Connector" publicKeyToken="31bf3856ad364e35"/>

 

          <bindingRedirect oldVersion="0.0.0.0-3.0.0.0" newVersion="3.0.0.0"/>

 

</dependentAssembly>

NOTE: Changing client side config files in RTC folder (Microsoft.Dynamics.Nav.Client.exe.config and finsql.exe.config) is only needed to run the New-NavCRTable cmdlet and/or to compile objects within CSIDE. This is typically done by developers using test workstations or workstations dedicated to develop code. These steps are not necessary to be done on end users workstations.

 

(6) Restart NST

(7)  These 2 object may fail to load or compile because they are looking for different SDK version, then open TAB5330.TXT and COD5330.TXT in designer and change explicit references to .NET CRM Assemblies version 8 to be completely without a version like e.g. in Release notes for NAV 2018

https://docs.microsoft.com/en-us/dynamics-nav/d365-sales-modifications-for-upgrade?branch=crm-technical-upgrade

 

Change:

DotNet "'Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.<class/type>"

To:

DotNet "'Microsoft.Xrm.Sdk'.<class/type>”

Change:

DotNet 'Microsoft.Xrm.Tooling.Connector, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.<class/type>”

To:

DotNet "'Microsoft.Xrm.Tooling.Connector'.<class/type>”

 

Save and successfully compile  TAB5330.TXT and COD5330.TXT

NOTE: This step MAY not be required with version 13.x or 14.x or higher since these versions comes with TAB5330 and COD5330 with assemblies already declared without version

NOTE: You must have a valid development license to perform this task

(8) Run the client and test connection once again. It should be successful.

I have the same question (0)
  • ShanAbeywicrema Profile Picture
    948 on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    Hello Duilio,

    When we having this problem in 2021, I followed these steps and it was working fine till yesterday. I am just wondering is there anything again Microsoft has changed?

    Get this error

    ---------------------------

    The connection setup cannot be validated. Verify the settings and try again.

    Detailed error description: The system is unable to connect to Microsoft Dynamics CRM.

    Detailed description: Unable to Login to Dynamics CRM

    Unable to Login to Dynamics CRM.

    Using same credential  can log into CRM.

    Do I need to update latest crmsdk dll from  https://www.nuget.org

  • THE Italian Profile Picture
    on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    This is totally different than the one reported in this blog. Please update your NAV 2017 installation to the latest CU (both application and platform). If the issue persists, contact your partner and ask to open a support request to Microsoft.

  • Zdenek Zert Profile Picture
    10 on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    Hi,

    Synchronizing NAV 2017 with CRM 365. I applied all above. All manual synchronizations are working well, but NAV Task Scheduler is unable to run Job Queue Entries (running codeunit 5339 to synchronize modified records). Every time it fails with "Unable to Login to Dynamics CRM" error.

    However if I run the CU 5339 myself using report even on the same service tier as task scheduler is running, all synchronizations work properly.

    Is there some Service Tier setup I am missing for task scheduler? Or should it be run under specific user account?

    Thank you in advance.

  • THE Italian Profile Picture
    on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    This is working perfectly in all environments. As of now, none had any issue. Most probably you have requested an extension to RDS to D365 team up until deadline (30th June) and now that RDS has been decommissioned your environment stop working and there is not other way than deploy shorter or longer term solution.

    If you cannot make it to deploy it alone, please open a support request to Microsoft.

  • ShanAbeywicrema Profile Picture
    948 on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    This worked perfectly but again I am facing same problem today. Do we need to download higher CRM SDK?

  • Samcham Profile Picture
    10 on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    Hi, after applying the temporary fix with the dlls, we are getting this error :


    ---------------------------

    The connection setup cannot be validated. Verify the settings and try again.
    Detailed error description: Attempt by security transparent method 'Microsoft.Xrm.Tooling.Connector.CrmConnection..ctor(System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String, System.String)' to access security critical method 'Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifier..ctor(System.String, Microsoft.IdentityModel.Clients.ActiveDirectory.UserIdentifierType)' failed.

    Assembly 'Microsoft.Xrm.Tooling.Connector, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' is partially trusted, which causes the CLR to make it entirely security transparent regardless of any transparency annotations in the assembly itself. In order to access security critical code, this assembly must be fully trusted..
    ---------------------------
    OK
    ---------------------------

    Edit: Nevermind, forgot to unclock the dll files.

  • THE Italian Profile Picture
    on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    For the audience.

    This error arise because of trying to enable OAuth authentication after deploying the trick but within a NAV version that does not support this authentication type.

    When applying what's written in the blog post you have to leave the O365 legacy integration. This is just the short term mitigation due to RDS deprecation.

  • THE Italian Profile Picture
    on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    I do not think so. Open a request to support, I think you have mixed files and versions at this stage.

  • Maksym Profile Picture
    10 on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    Duilio Tacconi, thank you for you assistance.

    First problem is gone (all modified objects are compiled without any issues).

    Second problem still exists:

    Microsoft Dynamics NAV

    ---------------------------

    The connection setup cannot be validated. Verify the settings and try again.

    Detailed error description: Unable to cast object of type 'Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.InteractiveWebUI' to type 'Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.IWebUI'..

    ---------------------------

    OK

    ---------------------------

    According to error description we have inconsistent assignment : InteractiveWebUI to IWebUI object type of

    Microsoft.IdentityModel.Clients.ActiveDirectory library.

    Event viewer

    ExceptionStackTrace:

      at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.RunAsyncTask[T](Task`1 task)

      at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ObtainAccessToken(AuthenticationContext authenticationContext, String resource, String clientId, Uri redirectUri, PromptBehavior promptBehavior, UserIdentifier user)

      at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.RefreshWebProxyClientToken()

      at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.get_CrmWebClient()

      at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.get_OrganizationWebProxyClient()

      at Microsoft.Dynamics.Nav.Runtime.CrmTableConnection.GetClientCredentials(CrmServiceClient connection)

      at Microsoft.Dynamics.Nav.Runtime.CrmTableConnection.ValidateCrmOnlineConnection(CrmConnectionStringBuilder crmConnectionStringBuilder, CrmServiceClient connection)

      at Microsoft.Dynamics.Nav.Runtime.CrmTableConnection.GetCrmServiceClientInstance(CrmConnectionStringBuilder crmConnectionStringBuilder)

      at Microsoft.Dynamics.Nav.Runtime.CrmTableConnection.GetOrganizationService()

      at Microsoft.Dynamics.Nav.Runtime.CrmDataProvider.<>c__DisplayClass69_0`1.<ExecuteServiceCall>b__0()

      at Microsoft.Dynamics.Nav.Types.NavThread.RunExternalAction[T](Func`1 action)

      at Microsoft.Dynamics.Nav.Runtime.CrmDataProvider.ExecuteServiceCall[T](Func`2 function, Func`2 handleException, IRecordBuffer recordBuffer)

    Could be problem in different file versions?

    NAV2017 Microsoft.IdentityModel.Clients.ActiveDirectory.dll v. 2.28.30916.1754

    NAV2018 Microsoft.IdentityModel.Clients.ActiveDirectory.dll v. 3.19.50615.2240

    Could you please assist ?

    Thank you in advance.

  • THE Italian Profile Picture
    on at
    RE: How to deploy manually the newer version of CRM SDK on premise to skip Regional Discovery Service (RDS) validation error

    This blog has been updated to reflect new findings. Your issue is related to missing correct bindings with finsql.exe.config file

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 > Small and medium business | Business Central, NAV, RMS

#1
Nimsara Jayathilaka. Profile Picture

Nimsara Jayathilaka. 3,878

#2
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 3,390

#3
Sumit Singh Profile Picture

Sumit Singh 2,884

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans