Hi,
I am using C# to connect to Dynamics 365. I used the same code and it works for one instance and not for another one. I get the following error : "ID3007: The element 'pp' with namespace 'schemas.microsoft.com/.../SOAPFault' is unrecognized."
I have the "Microsoft.CrmSdk.CoreAssemblies" package installed V 9.0.2.12 and targeting the .NET Framework 4.7.2.
the first instance in CRM that works fine with my code is a free trial with Server version: 9.1.0000.6227
the second instance that is giving me the error is another free trial with Server version: 9.1.0000.6421. I even tried to connect to the second instance using the Microsoft Dynamics 365 Plugin Registration Tool Version 9.0.0.9479 64 bit and it is not connecting
The code is the following
namespace ConnectToCRM {
class Program {
static void Main(string[] args) {
try
{
IOrganizationService organizationService = null;
ClientCredentials clientCredentials = new ClientCredentials();
clientCredentials.UserName.UserName = "y@MyDomain.onmicrosoft.com";
clientCredentials.UserName.Password ="MyPass";
// For Dynamics 365 Customer Engagement V9.X, set Security Protocol as TLS12
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Get the URL from CRM, Navigate to Settings -> Customizations -> Developer Resources
// Copy and Paste Organization Service Endpoint Address URL
organizationService = (IOrganizationService)new OrganizationServiceProxy(new Uri("">MyDomain.api.crm12.dynamics.com/.../Organization.svc"),
null, clientCredentials, null);
if (organizationService != null)
{
Guid userid = ((WhoAmIResponse)organizationService.Execute(new WhoAmIRequest())).UserId;
if (userid != Guid.Empty)
{
Console.WriteLine("DOTNET 2015 : Connection Established Successfully...");
}
}
else
{
Console.WriteLine("DOTNET 2015 : Failed to Established Connection!!!");
}
}
catch (Exception ex)
{
Console.WriteLine("DOTNET 2015 : Exception caught - " + ex.Message);
}
Console.ReadKey();
}
}
}
*This post is locked for comments
I have the same question (0)