Apps

Published on October 25th, 2018 | by Bibhuranjan

0

TLS 1.2 Connectivity For Microsoft Dynamics 365 Customer Engagement

Take a scenario, where we have our custom application developed using Dynamics 365 Service, which has been thoroughly tested, suddenly start giving us exceptions, on version 9.0.

Exceptions like

  • “Unable to Login to Dynamics CRM. OrganizationServiceProxy is null”
  • “Metadata contains a reference that cannot be resolved: ‘https://orgname.crm8.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=9’”

It seems strange at first, cause the same code is running absolutely fine in version 8.2.

If we are closely following the latest updates from Microsoft dynamics CRM services, we will realize that the version 9.0 of Dynamics 365 Customer Engagement only supports TLS 1.2, so any request generated using an older version like TLS .1.0 or TLS 1.1 will fail.

TLS 1.2 stands for Transport Layer Security, which aims to provide secure and reliable communication between the client and server and 1.2 being the latest version of it, which was defined in August 2008. (TLS 1.3 has been recently defined in August 2018).

So, what it means for the Dynamics 365 developer and administrator and what do they need to do.

Well, if you are using Visual Studio 2017, simply recompile your application using .NET framework 4.6.2 or higher, as the hosting process of Visual Studio 2017 uses TLS 1.2.

For Visual Studio 2015, the recompilation to .NET framework 4.6.2 or higher will not work as by default the hosting process of Visual Studio 2015 doesn’t support TLS 1.2.

So for Visual Studio 2015, we have two options

  1. Right-click the Project, go to Properties and uncheck Enable the Visual Studio hosting process option.

  1. Use the following piece of code to force in your application to use the TLS 1.2 protocol.

For the scenario, where we do not have the option of recompiling the application, we need to update the registry, which will force .NET to use the latest possible security standard.

  1. Run regedit.exe to open the registry editor.
  2. Create a text file named strong strongcrypto4-enable.reg, with the following content.

For 32-bit applications on 32-bit systems and 64-bit application on 64-bit based systems

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319

“SchUseStrongCrypto”=dword:00000001

For 32-bit applications on the 64-bit machine.

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319

“SchUseStrongCrypto”=dword:00000001

  1. Click on File  Import to import the file in Registry Editor.
  2. Followed by a restart of the system.

Thus the custom application developed using Visual Studio 2017 and the latest version of .NET Framework will not have to worry about this, however, the already developed application developed using an older version of .NET Framework and Visual Studio would require one of the above changes to be implemented especially the Upgrade projects need to take this into consideration.

 

Tags: , , , ,


About the Author

Avatar photo

Editorial Officer, technofaq.org I'm an avid tech enthusiast at heart. I like to mug up on new and exciting developments on science and tech and have a deep love for PC gaming. Other hobbies include writing blog posts, music and DIY projects.



Leave a Reply

Your email address will not be published. Required fields are marked *

Back to Top ↑