Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Connection to Dynamics 365 CE from Windows Server 2016

Posted on by 30,188

Hi friends,

I don't usually ask questions here, but have encountered an issue that never had before. We have a very simple C# Console application that connects to a Dynamics 365 environment that is running without any issues on Windows 10 and Windows Server 2012 R2. The code that we are using is shown below.

private CrmServiceClient Connect(string userName, string password, string orgName, string region = "North America")
{
   ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
   CrmServiceClient conn = new CrmServiceClient(userName, ConvertToSecureString(password), region, orgName, isOffice365: true);
   
   return conn;
}


Like I said this works in Windows 10 and Windows Server 2012 R2, so there are no issues with the code, credentials, orgName or region that are being passed to the function.

After executing the function, the returned CrmServiceClient has the following information:

ConnectedOrgFriendlyName: null

ConnectedOrgId: {00000000-0000-0000-0000-000000000000}

IsReady: false
LastCrmError: Unable to Login to Dynamics CRM

I have tried this with various versions of the SDK (8.2, 9.0) and am getting the same results. The target environment is 9.0, but have also tried with a target 8.2 environment.

Internet Explorer Enhanced Security Configuration has also been turned off.

Any help would be appreciated.

Thanks.

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans