[SOLVED] Connection to Dynamics 365 Customer Engagement Error
Introduction:
After switching to Dynamics 365 Customer Engagement V 9.0 many of us are getting an error while trying to connect with the system using code. Here we will see how to connect to Dynamics 365 using a Console app in v8.2 and when the same code is used to connect to version 9 we get an error. We will also discuss about how to resolve the issue.
Implementation:
Step 1: The code shown below is used to connect to Dynamics 365 version 8.2 using Console App
Below is the ConnectToCRM function
Step 2: When we run the above code, we get the following output
Step 3: Now we change the credentials and try connecting to Dynamics 365 V9 with the same code we get the following error
Step 4: To solve this issue there are two ways in the first method, set the Target framework to “.NET Framework 4.6.2 or above”.
Step 5: After changing the target version build the solution again and run the app and the connection to Dynamics 365 version 9 environment will be successful.
Step 6: The second method is by using the below code before making a connection.
Here TLS stands for “Transport Layer Security,” and is a protocol that is an industry standard designed to protect the privacy of information communicated over the Internet.
Hope this helped!
This comment has been removed by the author.
ReplyDelete