Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Metadata contains a reference that cannot be resolved

Posted on by Microsoft Employee

Hello, I am trying to connect to our Dynamics 365  But I am getting the following error

: Metadata contains a reference that cannot be resolved: 'crmdev01.dataservtech.com/.../Organization.svc;sdkversion=9'. Inner Exception: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 172.26.10.107:443 at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception) --- End of inner exception 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) Source: System.ServiceModel 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.OrganizationServiceConfiguration..ctor(Uri serviceUri, Boolean enableProxyTypes, Assembly assembly) at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly) at Microsoft.Xrm.Sdk.Client.ServiceProxy`1..ctor(Uri uri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials) at DSWebServices.Code.CRMHelper.GetOrganizationService() at DSWebServices.Code.CRMHelper

Microsoft Dynamics 365Version 1612 (8.2.2.112) (DB 8.2.2.112) on-premises

.Net framework 4.5.2 

I am using the latest SDK installed from (Install-Package Microsoft.CrmSdk.CoreAssemblies -Version 9.0.2.4)

 I also have   ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 before calling organization proxy even then I am getting the error Please help. 

My code works on my local machine but when I move it server for testing I am facing this issue. Please help. Thanks!

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Metadata contains a reference that cannot be resolved

    Thanks The connection from the server was the issue.

  • Suggested answer
    Alex Fun Wei Jie Profile Picture
    Alex Fun Wei Jie 33,626 on at
    RE: Metadata contains a reference that cannot be resolved

    Hi,

    it seems the server block the connection to CRM. Please check if you can access crm from that server.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Metadata contains a reference that cannot be resolved

    Hi,

    If your code works from your machine but not on server then it the machine specifc issue. Check if your able to connect to your crm from that server. If not, you need to fix that. May be something is bloking crm access from the server.

    Hope this helps.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans