Hi,
I am getting the following error with one of my plugins:
"An unsecured or incorrectly secured fault was received from the other party"
My CRM 2011 is on premises, and the error is sporadic.
This error is being thrown by I method executing a RetrieveMultiple (QueryExpression):
This is how i create my IOrganizationService:
var organizationUri = new Uri(orgUrl);var credentials = new ClientCredentials();
var deviceCredentials = Microsoft.Crm.Services.Utility.DeviceIdManager.LoadOrRegisterDevice();
credentials.UserName.UserName = username;
credentials.UserName.Password = password;
var serviceProxy = new OrganizationServiceProxy(organizationUri, null, credentials, deviceCredentials);
serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior(Assembly.GetExecutingAssembly()));
service = serviceProxy;
Any ideas?
Thanks