Hi All,
I write an MVC application that connets the CRM . I am caching the service into memory cache in WCF service.. When concurrent users are trying to log into system crm service gives can not access disposed object error. Here is the code below.
Any Ideas?
using (OrganizationServiceProxy proxy = new OrganizationServiceProxy(new Uri(OrganizationUrl), null, userCredentials, null))
{
proxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
//create organization service with layer of proxy
service = (IOrganizationService)proxy;
}
If you find this post helpful then please Vote as Helpful and Mark As Answer. Thanks and Regards, Polat Aydın
My blog