I am working on an integration code to connect the On-Premise CRM to online. We updated the CRM from Dynamics 2015 to 365 and we need to update the on-premise CRM as well. The integration program needs to update the dlls referenced in order to integrate with Dynamics 365. When I try to connect using the credentials, an error is thrown as follows
"Exception thrown: 'System.NotSupportedException' in Microsoft.Xrm.Sdk.dll"
I cannot downgrade the dll version on this as it is of no use. This is the code I used to connect.
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Client;
using Microsoft.Xrm;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Net;
using System.Net.Security;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Xrm.Tooling.Connector;
namespace Integrations
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Starting connection...");
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
string connectionString = ConfigurationManager.ConnectionStrings["CrmConnection"].ConnectionString;
Console.WriteLine(connectionString);
CrmServiceClient conn = new Microsoft.Xrm.Tooling.Connector.CrmServiceClient(connectionString);
if (conn.IsReady)
{
Console.WriteLine("Starting integrations...");
IntegrationMethod();
Console.WriteLine("Completed integrations... Closing.");
}
Environment.Exit(0);
}
}
}
Any suggestions would be helpful.