We're creating an ASP.NET MVC app that talks to CRM 2011. We are using the Xrm.Client.Services.OrganizationService. We have a singleton pattern in place for this.
Under load we are seeing an ObjectDisposedException (cannot access a disposed object). I'm thinking that a singleton is not the way to go here.
I'm considering a [ThreadStatic] singleton, or a pool of services, or anything else that might help. Is anyone aware of any limits on the number of connections to CRM that can be made? Anyone experienced the disposed service before? I've been told that having too many org services connecting to CRM at once can be problematic as well, so that's why I'm not creating a new one for each hit to CRM.
Thanks for any help you can provide! If any more clarification is required, please ask.