1
votes

I am trying to run the Entities solution against Dynamics 365 online instance and i am getting the following error: The remote name could not be resolved: 'disco.MyInstance.crm.dynamics.com'

I have updated the assemblies for the sdk from v 8.0 to 9.0.2.5 (latest stable) so i can get the benefits of the latest D365 Apis.

I checked my instance and i found that the metadata disco endpoint url is the following:

https://MyInstance.api.crm.dynamics.com/XRMServices/2011/Organization.svc

you see that my instance url has "api" which doesn't exist from the generated url of the latest SDK version.

Here is the screen shot of the error:

enter image description here

here is the code to get server configs from a user in this console app:

static public void Main(string[] args)
    {
        try
        {
            // Obtain the target organization's Web address and client logon 
            // credentials from the user.
            ServerConnection serverConnect = new ServerConnection();
            ServerConnection.Configuration config = serverConnect.GetServerConfiguration();

            CreateUpdateEntityMetadata app = new CreateUpdateEntityMetadata();
            app.Run(config, true);
        }

}

Any pointers how to resolve this?

1

1 Answers

0
votes

I would suggest posting the code in question, or if it's from a Microsoft sample, a link to the sample.

In the meantime, there are two separate endpoints...

  1. The discovery endpoint which give you info about the orgs you have access to. Its format is https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc
  2. The organization service endpoint where you can retrieve data and metadata. Its format is https://myInstance.api.crm.dynamics.com/XRMServices/2011/Organization.svc

Your code seems to be trying to access a non-existent combination of the two.

I would check the code where the exception happens to see if it's trying to get information ABOUT the org(s) (i.e. discovery service) or information FROM the org (i.e. organization service).

My hunch is that it's the latter, in which case you'd want to hit https://myInstance.api.crm.dynamics.com/XRMServices/2011/Organization.svc