My situation is that suddenly I get :Value cannot be null.Parameter name: service when trying to get organizationservice,after googling I found that my proj uses WS-Trust security and it might create my problems,
after reading about it in ms docs I found that this might be my case :
If you are accessing the CrmServiceClient.OrganizationServiceProxy
property:
Remove all use of that property in your code. CrmServiceClient
implements IOrganizationService
and exposes everything that is settable for the organization service proxy.
My question is if I remove my use of :
CrmServiceClient crmServiceClient = new CrmServiceClient( connectionString);
IOrganizationService organizationService = (IOrganizationService)crmServiceClient.OrganizationWebProxyClient != null
? (IOrganizationService)crmServiceClient.OrganizationWebProxyClient : (IOrganizationService)crmServiceClient.OrganizationServiceProxy;
what could be the replacement ?
Does anyone deal with that case? Is there an other way to solve it ?