web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Metadata contains a reference that cannot be resolved. Internal Error (The remote server returned an error: (400) Bad Request)

(0) ShareShare
ReportReport
Posted on by 80

Hello All,

I am trying to connect MS Dyn CRM 2016 (On-Premises) with Dyn GP 2015 using Connector for Dynamics. And I am getting the below error

"

Metadata contains a reference that cannot be resolved: 'server/.../Discovery.svc;sdkversion=7.1'.
--- Exception Dump ---
Caught Exception: [System.InvalidOperationException] Metadata contains a reference that cannot be resolved: 'server/.../Discovery.svc;sdkversion=7.1'.
Stack trace:
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.ResolveNext(ResolveCallState resolveCallState)
at System.ServiceModel.Description.MetadataExchangeClient.GetMetadata(MetadataRetriever retriever)
at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveServiceEndpointMetadata(Type contractType, Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)
at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateManagement[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011Adapter.GetCrmDiscoveryWebServiceClient()
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011Adapter.GetOrgExtDetail()
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011Adapter.GetOrgEndpoint()
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011Adapter.GetCrmWebServiceClient()
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011Adapter.GetSystemUserId(String userFullName, IOrganizationService serviceInstance)
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011Adapter.get_IntegrationUserId()
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CRM2011AdapterUtilities.GetReaderQueryExpression(String entityName, DateTime modifiedDate, CRM2011Adapter adapter, Boolean isDynamic, ColumnSet columnSet)
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CrmObjectProvider.GetModifiedEntityKeys(DateTime modifiedDate, String keyPropertyName, String keyDisplayName)
at Microsoft.Dynamics.Integration.Adapters.Crm2011.CustomerObjectProvider.ReadObjectKeys(DateTime modifiedDate)
at Microsoft.Dynamics.Integration.AdapterAbstractionLayer.MixedObjectProviderProxy.ReadObjectKeys(DateTime modifiedDate)
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.ReadObjectKeyList(DbMap map, DateTime queryDate, Int32& count)
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.GetObjectKeys(DbMap map, OperationType operationType, DateTime queryDate, Int32& count)
at Microsoft.Dynamics.Integration.Service.Tasks.MapWork.ProcessRecordsImplementation(OperationType operationType)

Inner Exception: [System.Net.WebException] The remote server returned an error: (400) Bad Request.
Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)


User: server\admini
Machine: xyz 

"

I tried changing my dll version of Microsoft.Xrm.Sdk from old to latest but this is the error i always get. 

Note : I have 3 organization in my deployment manager and all of the organization have same DISCOVERY SERVICE URL. I disabled the other two but still getting the same error. 




Any Help Guys. . . 

*This post is locked for comments

I have the same question (0)
  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Are you entering username, password and domain or just username and password?

  • faisal.malik84 Profile Picture
    80 on at

    I am entering Username : Server\username

    Password : *********

    URL : Discovery Service URL

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Try entering UserName in the Username field, Password in password field and Domain in domain field.

    Also, I see you are entering Server\username. Should be domain\username

    Try it out.

  • faisal.malik84 Profile Picture
    80 on at

    Sorry Aric,

    I am entering Domain\username not the server\username.

    There is no field of Domain in connector.

  • faisal.malik84 Profile Picture
    80 on at

    any Idea,

    Everything was working fine untill i create a new organization. After creation  its throwing this error.

    I disabled the organization but still error remains.

    What to do now?

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Can you verify again that the Discovery Url under Settings -> Customizations -> Developer Resources is the same?

    Also, try remove the sdkversion portion from the Url. It is actually set to v7.1 (which is 2015). If you do set it, it should be 2016 (v8.0), but try leaving it empty:

    server/.../Discovery.svc

  • faisal.malik84 Profile Picture
    80 on at

    I haven't set this the sdkversion in the Discovery Service URL. Its coming in the error.

    I tried to change the sdk dll in "C:\Program Files (x86)\Microsoft Dynamics\Microsoft Dynamics Adapter\Adapters\Microsoft.Dynamics.Integration.Adapters.Crm2011", so the version of SDK comes automatically at the end.

    My discovery service URL is "server/.../Discovery.svc"

  • Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    What is the version of the SDK files that you changed in the integration directory?

    It is also possible that the version of the GP Adapter is incompatible with the current version of CRM.

    You should be aware that the CRM Connectors have been deprecated (I think only in 365 version).

  • faisal.malik84 Profile Picture
    80 on at

    I changed sdk dll versions from 5.0 to 8.2. And it is not working on any of them.

    And the connector is compatible of CRM 2016 update 2 and GP 2015.

    Still it is throwing error.

    My question is, before creating organization it was working fine but after creating a new organization it is failing even after disabling the organization it is still failing.

  • Community Member Profile Picture
    on at

    Hi Faisal, may I know if u already solve this issue. Cause I m also looking for this solution. Pls help.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans