Hi all,
First of all, I am a total newbie. I am starting playing with the SDK I already have 3 questions :
1) CrmServiceClient : IDisposable
The sample code from https://community.dynamics.com/crm/b/develop1/archive/2017/03/11/simplified-connection-management-amp-thread-safety-revisited does not call client.Dispose. When I am adding client.Dispose in the final clause of the // For then the app start crashing randomly with exceptions like:
System.ObjectDisposedException occurred
HResult=0x80131622
Message=Cannot access a disposed object.
Object name: 'System.ServiceModel.ChannelFactory`1[Microsoft.Xrm.Sdk.IOrganizationService]'.
Source=System.ServiceModel
StackTrace:
at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.RetrieveMultiple(QueryBase query)
System.NullReferenceException occurred
HResult=0x80004003
Message=Object reference not set to an instance of an object.
Source=Microsoft.Xrm.Tooling.Connector
StackTrace:
at Microsoft.Xrm.Tooling.Connector.CrmServiceClient.RetrieveMultiple(QueryBase query)
Am I suppose to call Dispose on CrmServiceClient ?
2) TLS version
The handshake protocol is 1.0. Is this a limitation of the client ? Who is managing the (tls) session : windows or client ?
3) Connections
Whatever the number of threads I am running, only 2 connections are opened to my organisation. I guess that I can improve the overall performance by using more connections. Is there perf counters showing the contention on the connection ? Is there a way to allow more connection to be created (same process)?
Thank you for your help and time.
*This post is locked for comments
I have the same question (0)