Hi all ,
I am trying to Access CRM 2011 Online using Services in my custom application and I am facing the below errorwhen I call my Organizationserviceproxy
‘Metadata contains a reference that cannot be resolved’ PFB my code
OrganizationServiceProxy serviceProxy;
ClientCredentials deviceCredentials = new ClientCredentials();
ClientCredentials clientCredentials = new ClientCredentials();
Uri OrganizationUri = new Uri(String.Format("<a href="https://<<>>/XRMServices/2011/Organization.svc">https://<<>>/XRMServices/2011/Organization.svc"));
Uri HomeRealmUri = null;
clientCredentials.UserName.UserName = "username";
clientCredentials.UserName.Password = "password";
deviceCredentials = DeviceIdManager.LoadDeviceCredentials();
//deviceCredentials.UserName.UserName = "DId";
//deviceCredentials.UserName.Password = "Dpw";
//Using Organization Service Proxy to instantiate the CRM Web Service
try
{
// ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors SslPolicyErrors)
// {
// return true;
// };
serviceProxy = new OrganizationServiceProxy(OrganizationUri, HomeRealmUri, clientCredentials, deviceCredentials);
// This statement is required to enable early-bound type support.
serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
IOrganizationService service = (IOrganizationService)serviceProxy;
}
catch (Exception err) { }
Regards ,
Raga