Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Error on SDK connection using Console Application

(0) ShareShare
ReportReport
Posted on by 8,270

Hi guys,

I have a "console application" that queries the CRM database and then inserts a row in a custom entity. But randomly it's throwing this error:

"System.ServiceModel.FaultException '1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Connection State is closed. Please open the connection before executing the command. <Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault>."

And I don't really know how to fix that, like having the connection always open or such a thing.

btw I'm using CRM Online 2013.

Regards,

Raúl

*This post is locked for comments

  • Suggested answer
    ScottDurow Profile Picture
    19 on at
    RE: Error on SDK connection using Console Application

    Hi, This sounds like you have a plugin that is re-using a service instance across threads by using instance members. Try disabling plugins and seeing if the issue is resolved.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
dkrishna Profile Picture

dkrishna 6

Featured topics

Product updates

Dynamics 365 release plans