locked
'http://crmdev/crmdev/XrmServices/2011/Organization.svc' was aborted RRS feed

  • Question

  • Anyone familiar with this error?  It is intermittent and I cannot figure out the cause. I am only logging the first 250 characters in the log, so I don't have the rest of the error message.  But I think the rest is just the generic message to contact your CRM Admin or Microsoft if the problem continues.

    The HTTP request to 'http://crmdev/crmdev/XrmServices/2011/Organization.svc' was aborted.  This may be due to the local channel being closed while the request was still in progress.  If this behavior

    This error is coming from an integration web service that syncs data between CRM and a legacy database.  This just shows up every once in a while during the sync. 

    I did find this post, which I am looking into now.  http://www.powerobjects.com/blog/2012/02/10/crm-connection-aborted/ In their post they are saying that this is a "rookie mistake", which rings of arrogance by whoever wrote that post.  But guess who we contracted to write the code that has this issue? 

    Their solution is creating and disposing of the OrganizationService and IOrganizationService objects for every hit to CRM.  Sounds pretty inefficient way to handle the connection to CRM. But it if is needed and the best approach, I can certainly implement this.  Considering where the code came from that I am fixing, I don't want to blindly trust that blog post and would appreciate any thoughts others may have in regards to this one.

    Any comments or suggestions in regards to what they are saying here is much appreciated.  

    Best regards,


    Jon Gregory Rothlander









    Monday, September 29, 2014 4:46 PM

Answers

  • The approach I've taken in the past is to use just one organisation service instance, but to check the CommunicationState and recreate it if it is not open (in the code below, _svc is of type OrganizationServiceClient, and CreateClient is a method to reinstantiate it):

                                if (_svc.State != CommunicationState.Opened)          // Check for faulted WCF proxy
                                {
                                    try
                                    {
                                        _svc.Abort();
                                    }
                                    finally
                                    {
                                        _svc = CreateClient();
                                    }
                                }


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, September 30, 2014 10:00 AM
    Moderator

All replies

  • hello Jon,

    the error message is too generic to provide a reasonable reply. I will try.

    the different options you could check are

    1. If there is a time out caused between the time service channel is open and the results returned.

    2. If there are any network error that triggers this message.

    if you have built fault tolerance in your integration code, you can ignore these one off service fault message.

    based on the power of your servers, creating and disposing the organisation service may not be that experience. Worth the reliability - if it provides it.

    you could change the code, time it and test it I your dev area for couple of weeks to see if this solution fixes the issue.

    and, not all codes in all companies are experts in all technology 😊

    regards

    Jithesh

    Monday, September 29, 2014 10:55 PM
  • The approach I've taken in the past is to use just one organisation service instance, but to check the CommunicationState and recreate it if it is not open (in the code below, _svc is of type OrganizationServiceClient, and CreateClient is a method to reinstantiate it):

                                if (_svc.State != CommunicationState.Opened)          // Check for faulted WCF proxy
                                {
                                    try
                                    {
                                        _svc.Abort();
                                    }
                                    finally
                                    {
                                        _svc = CreateClient();
                                    }
                                }


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Tuesday, September 30, 2014 10:00 AM
    Moderator