We are using OrganizationServiceProxy object (created by using the Microsoft.Xrm.Tooling.Connector.CrmServiceClient) to access CRM in our web service functions. From time to time, we would encounter this "The underlying connection was closed: A connection that was expected to be kept alive was closed by the server." WebException. Can anyone give a solution to solve this problem.
Searching on internet, it is suggested that setting the connection KeepAlive to false can solve the problem. However, the OrganizationServiceProxy does not provide a way to change this property. Can somebody help?