web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

What is the function of DisableCrossThreadSafeties? Is there any risk if it is set to true or false

(0) ShareShare
ReportReport
Posted on by

I have a concurrent program to request crm, and then I found that the DisableCrossThreadSafeties property setting of CrmServiceClient supports concurrency, and found that setting it to true increases the concurrency efficiency by 50%. Is there any risk to crm or thread safety issues?

CrmServiceClient svc = new CrmServiceClient(ConfigurationManager.AppSettings["ConnStr"]);
svc.DisableCrossThreadSafeties = true;

Set to false: the total time-consuming program runs to completion, time-consuming: 164930 list count: 320 average each millisecond: 515

Set to true Total time-consuming program to run to completion, time-consuming: 79941 list count: 320 average each millisecond: 249

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi,

    CrmServiceClient itself is thread safe, but if you use DisableCrossThreadSafeties, it will cause thread safety issues.

    You can refer to the official API documentation, here is a very clear statement:

    CrmServiceClient.DisableCrossThreadSafeties Property (Microsoft.Xrm.Tooling.Connector) | Microsoft Docs

    pastedimage1627522507237v1.jpeg

    If this helped you, I'd appreciate it if you'd mark this as a Verified Answer, which may in turn help others as well.

    Best Regards,

    Frank Gong

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Daniyal Khaleel Profile Picture

Daniyal Khaleel 60 Most Valuable Professional

#2
11manish Profile Picture

11manish 23 Super User 2026 Season 2

#3
Travis South Profile Picture

Travis South 14

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans