Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Is it possible to check is OrganizationServiceProxy connection closed or manually close it?

Posted on by 56

Hello,

i customized Owin flow in ASP.NET MVC with OrganizationServiceProxy and i have doubts will OrganizationServiceProxy connection be closed after Http request is over.

So my question is can i check is OrganizationServiceProxy connection closed or manually close it?

If yes, how?

Thank you :)

*This post is locked for comments

  • Genato Profile Picture
    Genato 56 on at
    RE: Is it possible to check is OrganizationServiceProxy connection closed or manually close it?

    Is there any way or any other "service" object that i could close connection explicitly like in ADO.NET SqlConnection.Close()?

  • Suggested answer
    Jeevarajan Kumar Profile Picture
    Jeevarajan Kumar 747 Most Valuable Professional on at
    RE: Is it possible to check is OrganizationServiceProxy connection closed or manually close it?

    Hi Genato,

    You can use Xrm tooling to connect using OrganizationServiceProxy like this,

    CrmServiceClient crmSvc = new CrmServiceClient(<orgServiceProxy>);

    To check if connection closed:

    Use CrmServiceClient.IsReady property. If true, the connection is successful.

    To dispose, you can wrap it within 'Using' statement.

    Please mark this as answer if it is helpful.

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!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans