Git Product home page Git Product logo

Comments (57)

daryllabar avatar daryllabar commented on May 19, 2024

Looks like your error is "Connection to CRM is not established. Aborting process." Have you tried rerunning it?

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

Yes I tried several times.
Recently I had to write a console app : I used microsoft.xrm.client.dll and the CrmConnection class.
When my organization was on CRM 2015, it worked perfectly but since I updated to CRM 2016 a similar error appeared in relation with the security token.
In order to resolve this I used the Microsoft.Xrm.Tooling.Connector.dll and it worked again.

I think it is the same issue, can you confirm ?

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Are you trying the plugin with the latest version of the XrmToolBox, or are you using the full version that contains the XrmToolBox? I just want to verify that you can connect with another tool in the tool box, but not with the EarlyBoundGenerator.

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

I try with the plugin with the latest version of the XrmToolBox.
Other plugins like Web Resources Manager are working fine.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

So it can connect fine, but the CrmSvcUtil cannot. Did you do a copy and replace? I'm wondering if there is something in the CrmSrvUtil Ref folder that is from a previous version... You are using the 2016.2.6.1 version of the EarlyBoundGenerator Correct?

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

I don't have any control of how the CrmSvcUtil.exe connects to CRM. You can attempt to turn on Tracing for it

<system.diagnostics> 
   <trace autoflush="false" indentsize="4"> 
      <listeners> 
         <add name="configConsoleListener" type="System.Diagnostics.ConsoleTraceListener"> 
            <filter type="System.Diagnostics.EventTypeFilter" initializeData="Error" /> 
         </add> 
      </listeners> 
   </trace> 
</system.diagnostics>

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

Indeed, I did a copy and replace and also use the 2016.2.6.1 version.
I turned on tracing but there is no additionnal informations, I suppose it's a bug in the CrmSvcUtil.exe which may be resolved later.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Can you verify that the URL in the Mscrmtools2001.config for OrganizationServiceUrl contains your Organization Unique name, vs the friendly version. MscrmTools/XrmToolBox#299 (comment)

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

I tried the 2 versions (https://myOrg.domain.com:444 and https://serverName.domain.com:444/myOrg) but none are functionning.

However, with the friendly version the error is different :

Executing "C:\Users\cmarty\Documents\XrmToolBox\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /url:"https://btbdev.identicar.fr:444/XRMServices/2011/Organization.svc" /namespace:"Identicar.BtB.Entities" /out:"C:\Users\cmarty\Desktop\Entities\CrmServiceContext.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.Entity.OverridePropertyNames,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions" /username:"cmarty" /password:"********" 
CrmSvcUtil : CRM Service Utility [Version 8.0.0.7134]
¸ 2015 Microsoft Corporation. All rights reserved

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (North America) URI is = https://disco.crm.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (Europe, Middle East and Africa) URI is = https://disco.crm4.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (Asia Pacific Area) URI is = https://disco.crm5.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (South America) URI is = https://disco.crm2.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (Oceania) URI is = https://disco.crm6.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (Japan) URI is = https://disco.crm7.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (North America 2) URI is = https://disco.crm9.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (Canada) URI is = https://disco.crm3.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Exception while trying to connect Discovery Server, (India) URI is = https://disco.crm8.dynamics.com/XRMServices/2011/Discovery.svc
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : No Orgs Found, Searched Online. Region Setting = 
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRM
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Reflection.TargetInvocationException: Une exception a ‚t‚ lev‚e par la cible d'un appel. ---> System.Exception: Connection to CRM is not established. Aborting process.
   … Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
   … DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService..ctor(IMetadataProviderService defaultService, IDictionary`2 paramters)
   --- Fin de la trace de la pile d'exception interne ---
   … System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   … System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   … Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source    : mscorlib
Method  : InvokeMethod
Date    : 09:18:35
Time    : 15/02/2016
Error   : Une exception a ‚t‚ lev‚e par la cible d'un appel.
Stack Trace : … System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   … System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   … Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
======================================================================================================================
Inner Exception Level 1 : 
Source  : CrmSvcUtil
Method  : Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata
Date    : 09:18:35
Time    : 15/02/2016
Error   : Connection to CRM is not established. Aborting process.
Stack Trace : … Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
   … DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService..ctor(IMetadataProviderService defaultService, IDictionary`2 paramters)
======================================================================================================================

Output file was not updated or not found!  C:\Users\cmarty\Desktop\Entities\CrmServiceContext.cs

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

If you log into CRM, and go to developer Extensions, what is the format of the organization service URL?

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

It's the following format https://serverName.domain.com:444/orgName/XRMServices/2011/Organization.svc and it leads to the first error message.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Have you tried replacing the "orgName" in your url with org unique name? I know this is different for CRM online, not sure for on prem.

7e205a0c-b577-11e5-8355-40b7b7332199 1

from dlab.xrm.xrmtoolboxtools.

 avatar commented on May 19, 2024

Hi. Im having the exact same issue. Other plugins works just fine. Same happens with CRM 2013 and 2016. Any clues to what could be the problem?

Thanks!

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

On on premises, the unique id is equal to the org name.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

@BackToTheCrm and @KasperPurunen, I don't have access to an On Prem Environment to test. I'm using the standard CrmSrvUtil.exe in order to connect, so there are 3 possibilities. They have a bug ( usually not very likely), I'm generating the incorrect URL, or I'm missing the correct DLL dependencies.

The Log in the UI of Early Bound Generator spits out the Command Line that is executed (Minus masking the password) Can one or both of you take that Command Line, and see if you can get it to work via the standard cmd.exe? There are two formats listed on MSDN:

  1. CrmSvcUtil.exe /url:https://myport:555/MyOrg/XRMServices/2011/Organization.svc
  2. CrmSvcUtil.exe /url:https://myorg.crm.com:555/XRMServices/2011/Organization.svc

I'm generating the first option I believe, maybe I need to be generating the 2nd for your instances.

Thanks for submitting the issue and for any trouble shooting you do to support the community.

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

I have tested the two formats via cmd.exe but none are working.
The error displayed is the same as in my first comment but if I remove the domain argument, the second error is displayed.

Personnally I think it's a bug in the CrmSrvUtil.exe. As I said before I had a similar error with a console app I wrote which was fixed by using the new assembly (Microsoft.Xrm.Tooling.Connector.dll) to connect to the CRM.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

The new version of the CrmSrvUtil.exe is using the Microsoft.Xrm.Tooling.Connector.dll. If you navigate to XrmToolBox\Plugins\CrmSvcUtil Ref\CrmSvcUtil.exe, what version is it?

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

It's the version 8.0.0.7134.
I tested other way to connect and it seems that the following command works :
CrmSvcUtil.exe /out:entitie.cs /connectionstring:"Url=https://serverName.domain.com:444/orgName;Domain=myDomain;UserName=cmarty;Password=*****;AuthenticationType=AD"

from dlab.xrm.xrmtoolboxtools.

 avatar commented on May 19, 2024

I have the same version as @BackToTheCrm.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

So there is an issue with the CrmSvcUtil v8.0.0
8134? connecting to CRM on prem? Is it IFD deployments or as standard adfs?

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

I mean standard AD?

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

It's an IFD deployment.
I try other connection string and it appears that AuthenticationType is not mandatory. Furthermore, the https://orgName.domain.com:444/ format doesn't work while the https://serverName.domain.com:444/orgName format works.

I think the simpler fix could be to use the /connectionstring: argument instead of the /url:, /username:, /password: and /domain: arguments.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Ok, so if I change it to spit out https://serverName.domain.com:444/orgName, it should work for IFDs?

If you don't specify a userid or password for ADFS it'll just default to your network credentials. This works great for your case, but not for CRM Online.

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

In my case, if I don't specify my credentials then an exception is fired.
I'm sorry but I doesn't understand your first sentence can you explain it in another way ?

On my environment the following command works :
CrmSvcUtil.exe /out:entitie.cs /connectionstring:"Url=https://serverName.domain.com:444/orgName;Domain=myDomain;UserName=username;Password=*****"
And this command doesn't work :
CrmSvcUtil.exe /out:entitie.cs /url:"https://serverName.domain.com:444/orgName" /domain:"myDomain" /username:"username" /password:"*****"

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

I use the XTB connection to create the command line parameters. I'll update it to create a connection string instead of specifying the url, domain, username, and password separately. Although I'll have to make sure I escape the password correctly...

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

I'm attempting to build this, but unfortunetly without an environment to test, this may take forever. @BackToTheCrm or @KasperPurunen would you be willing to give me an account to test with, or perhaps getting the latest code and ensuring that it works? I've built a new version that I think should output exactly what you you list @BackToTheCrm: My Best Guess

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

I can't give you an access because it's my client's environment.
I tested the version you give but it doesn't work, here is the log :

Executing "C:\Users\cmarty\Downloads\XrmToolBoxADFS\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /namespace:"CrmEarlyBound" /out:"C:\Users\cmarty\Downloads\XrmToolBoxADFS\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions" /username:"cmarty" /password:"********" /domain:"identicar" 
CrmSvcUtil : CRM Service Utility [Version 8.0.0.7134]
¸ 2015 Microsoft Corporation. All rights reserved


Options:
 /nologo
  Suppresses the banner.

 /language:<language>
  The language to use for the generated proxy code.  This can be either 'CS' or 'VB'.  The default language is 'CS'.  Short form is '/l:'.

 /url:<url>
  A url or path to the SDK endpoint to contact for metadata.

 /out:<filename>
  The filename for the generated proxy code.  Short form is '/o:'.

 /namespace:<namespace>
  The namespace for the generated proxy code.  The default namespace is the global namespace.  Short form is '/n:'.

 /interactivelogin:
  Presents a login dialog to loginto the service with, if passed all other connect info is ignored.  Short form is '/il:'.

 /connectionstring:
  Connection String to use when connecting to CRM. If provided, all other connect info is ignored.  Short form is '/connstr:'.

 /username:<username>
  Username to use when connecting to the server for authentication.  Short form is '/u:'.

 /password:<password>
  Password to use when connecting to the server for authentication.  Short form is '/p:'.

 /domain:<domain>
  Domain to authenticate against when connecting to the server.  Short form is '/d:'.

 /serviceContextName:<service context name>
  The name for the generated service context. If a value is passed in, it will be used for the Service Context.  If not, no Service Context will be generated

 /help
  Show this usage message.  Short form is '/?'.

 /generateActions
  Generate wrapper classes for custom actions  Short form is '/a'.

 /deviceid:<deviceid>
  Device ID to use when connecting to the online server for authentication.  Short form is '/di:'.

 /devicepassword:<devicepassword>
  Device Password to use when connecting to the online server for authentication.  Short form is '/dp:'.


Example:
crmsvcutil.exe /url:http://localhost/Organization1/XRMServices/2011/Organization.svc /out:GeneratedCode.cs

Output file was not updated or not found!  C:\Users\cmarty\Downloads\XrmToolBoxADFS\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs

You don't pass either the connectionstring arg or the url arg.
Besides the username, password and domain args still remain.
In my case, only the connectionstring arg containing the Url, UserName, Password and Domain works.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Ok, I'm not sure what the settings are from the XTB Connection Info that apply to your situation. Here is a new version that will spit out some info from the XTB connection information so I can see what flags I need to check for. Thanks for you continued willingness to trouble shoot this. Hopefully I can use the logging from this one to make the changes need to allow for the correct Connection String generation, and the next one will at least spit out what you're saying works.

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

You're welcome !
Here is the log :

ActiveDirectory
https://servername.domainname.com:444/BTBDev/XRMServices/2011/Organization.svc
False
Executing "C:\Users\cmarty\Downloads\XrmToolBoxDebug\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /url:"https://internaldevcrm2k15.identicar.fr:444/BTBDev/XRMServices/2011/Organization.svc" /namespace:"CrmEarlyBound" /out:"C:\Users\cmarty\Downloads\XrmToolBoxDebug\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions" /username:"cmarty" /password:"********" /domain:"identicar" 
CrmSvcUtil : CRM Service Utility [Version 8.0.0.7134]
¸ 2015 Microsoft Corporation. All rights reserved

Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Organization not found. Org = BTBDev/
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to Dynamics CRM
Unable to Login to Dynamics CRM
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Reflection.TargetInvocationException: Une exception a ‚t‚ lev‚e par la cible d'un appel. ---> System.Exception: Connection to CRM is not established. Aborting process.
   … Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
   … DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService..ctor(IMetadataProviderService defaultService, IDictionary`2 paramters)
   --- Fin de la trace de la pile d'exception interne ---
   … System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   … System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   … Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source    : mscorlib
Method  : InvokeMethod
Date    : 14:28:32
Time    : 17/02/2016
Error   : Une exception a ‚t‚ lev‚e par la cible d'un appel.
Stack Trace : … System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   … System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   … Microsoft.Crm.Services.Utility.ServiceFactory.CreateInstance[TIService](TIService defaultServiceInstance, String parameterValue, CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.ServiceProvider.InitializeServices(CrmSvcUtilParameters parameters)
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.get_ServiceProvider()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
   … Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
======================================================================================================================
Inner Exception Level 1 : 
Source  : CrmSvcUtil
Method  : Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata
Date    : 14:28:32
Time    : 17/02/2016
Error   : Connection to CRM is not established. Aborting process.
Stack Trace : … Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
   … DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService..ctor(IMetadataProviderService defaultService, IDictionary`2 paramters)
======================================================================================================================

Output file was not updated or not found!  C:\Users\cmarty\Downloads\XrmToolBoxDebug\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Ok, I assumed it was a Federation Authentication, but it's AD. I've updated to look for that, and so this one should get closer to what we need...

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

We're getting closer but there is still a little bug:

CRM Authentication Type Detected: ActiveDirectory
https://internaldevcrm2k15.identicar.fr:444/BTBDev/XRMServices/2011/Organization.svc
True
Executing "C:\Users\cmarty\Downloads\XrmToolBoxDebug2\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /namespace:"CrmEarlyBound" /out:"C:\Users\cmarty\Downloads\XrmToolBoxDebug2\Plugins\CrmSvcUtil Ref\CrmServiceContext.cs" /servicecontextname:"CrmServiceContext" /codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.NamingService,DLaB.CrmSvcUtilExtensions" /metadataproviderservice:"DLaB.CrmSvcUtilExtensions.Entity.MetadataProviderService,DLaB.CrmSvcUtilExtensions" connectionstring="Url=https://internaldevcrm2k15.identicar.fr:444/BTBDev/XRMServices/2011/Organization.svc;Domain=identicar;UserName=cmartyPassword=********" 
CrmSvcUtil Error: 2 : Exiting Microsoft.Crm.Services.Utility.ICommandLineArgumentSource.OnInvalidArgument: Found string connectionstring=Url=https://internaldevcrm2k15.identicar.fr:444/BTBDev/XRMServices/2011/Organization.svc;Domain=identicar;UserName=cmartyPassword=******** in arguments array that could not be parsed.

The connectionstring= part must be remplaced by /connectionstring:, and there is a semicolon missing between the username value and the Password key. I think it will be OK then.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

I'm keeping my fingers crossed (Is that a universal sign of good luck?) on this one

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

At least, in France, it's a sign of good luck !
I tested and there is an error, I managed to make it works by :

  • Adding Microsoft.Xrm.Sdk.Deployment.dll to the CrmSvcUtil Ref folder
  • Correcting the Connection string this way :
    • Before : Url=https://internaldevcrm2k15.identicar.fr:444/BTBDev/XRMServices/2011/Organization.svc;Domain=identicar;UserName=cmartyPassword=********
    • After : Url=https://internaldevcrm2k15.identicar.fr:444/BTBDev;Domain=identicar;UserName=cmarty;Password=********
    • (Removing of /XRMServices/2011/Organization.svc in the URL and adding a semicolon between username value dans the Password key)

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Take 4?5?6?

I added the deployment dll and removed the 2011 endpoint URL

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

I'll test it on friday.

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Sounds Good @BackToTheCrm!
@KasperPurunen I have a potential fix if you want to try it.

from dlab.xrm.xrmtoolboxtools.

 avatar commented on May 19, 2024

@daryllabar Sounds lovely. I'll try it during the day and report back. Thanks!

from dlab.xrm.xrmtoolboxtools.

diverjoe avatar diverjoe commented on May 19, 2024

I was able to successfully create individual entity files on the cmd line using the following command
--AND--
copying the CrmSvcUtil.exe from the currently downloadable SDK from MS. The file date and versions are older that what is shipping in the Full download.
EBG - 8.0.0.0000.8174 2/4/2016 10:15Pm
SDK - 8.0.0.0000.2074 12/7/2015 8:03 AM

As another data point, I also had trouble getting the Filter project in the SDK to build because of version mis-matches.

CrmSvcUtil.exe /url:http:////XRMServices/2011/Organization.svc /out:e:\Entities\Entities.cs /username:* /password:* /domain:******** /namespace:Xrm.Plugins.Common.Entities /serviceContextName:CrmServiceContext/codecustomization:"DLaB.CrmSvcUtilExtensions.Entity.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Entity.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Entity.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /namingservice:"DLaB.CrmSvcUtilExtensions.Entity.OverridePropertyNames,DLaB.CrmSvcUtilExtensions"

from dlab.xrm.xrmtoolboxtools.

diverjoe avatar diverjoe commented on May 19, 2024

BTW we are on 2016 On-Prem - non-IFD

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

My version of the CrmSvcUtil comes from the NuGet packages. So it's newer than the version in the Crm Sdk?

from dlab.xrm.xrmtoolboxtools.

diverjoe avatar diverjoe commented on May 19, 2024

Seems so

from dlab.xrm.xrmtoolboxtools.

diverjoe avatar diverjoe commented on May 19, 2024

here is the url I used:
https://www.microsoft.com/en-us/download/details.aspx?id=50032

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

Good news @daryllabar ! The take 4 is OK !

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

Resolved with 2016.2.18.1

from dlab.xrm.xrmtoolboxtools.

AdCodicem avatar AdCodicem commented on May 19, 2024

Hi @daryllabar !
The pre-release 2016.2.18.1 doesn't contain the fix.

Edit: Sorry it's an error.

from dlab.xrm.xrmtoolboxtools.

mariusso avatar mariusso commented on May 19, 2024

I get the following with version 1.2016.9.10 on CRM 2016 on-prem with IFD (I have edited username, org and domain):

CRM Authentication Type Detected: Federation
Executing "C:\Users\username\Desktop\XrmToolBox\Plugins\CrmSvcUtil Ref\crmsvcutil.exe" /url:"https://org.domain.no/XRMServices/2011/Organization.svc" /generateActions /out:"C:\Users\username\Desktop\XrmToolBox\Plugins\CrmSvcUtil Ref\Actions.cs" /namespace:"CrmEarlyBound" /codecustomization:"DLaB.CrmSvcUtilExtensions.Action.CustomizeCodeDomService,DLaB.CrmSvcUtilExtensions" /codegenerationservice:"DLaB.CrmSvcUtilExtensions.Action.CustomCodeGenerationService,DLaB.CrmSvcUtilExtensions" /codewriterfilter:"DLaB.CrmSvcUtilExtensions.Action.CodeWriterFilterService,DLaB.CrmSvcUtilExtensions" /username:"username" /password:"**************" /domain:"domain"
CrmSvcUtil : CRM Service Utility [Version 8.1.0.7711]
c 2015 Microsoft Corporation. All rights reserved

Unable to Login to Dynamics CRM
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Exception: Connection to CRM is not established. Aborting process.
at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source : CrmSvcUtil
Method : Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata
Date : 12:50:45
Time : 27.10.2016
Error : Connection to CRM is not established. Aborting process.
Stack Trace : at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.Microsoft.Crm.Services.Utility.IMetadataProviderService.LoadMetadata()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()

at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)

Output file was not updated or not found! C:\Users\username\Desktop\XrmToolBox\Plugins\CrmSvcUtil Ref\Actions.cs

from dlab.xrm.xrmtoolboxtools.

danielcrenna avatar danielcrenna commented on May 19, 2024

For those who come after, it's counterintuitive, but you can get around this flaw by specifying the orgname both in the subdomain and in the path for IDF+ADFS deployments:

https://org.domain.no/org/XRMServices/2011/Organization.svc

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

@danielcrenna is this something that is currently broken? This thread is pretty old.

from dlab.xrm.xrmtoolboxtools.

danielcrenna avatar danielcrenna commented on May 19, 2024

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

@danielcrenna so what url did the EBG build? Looks like org.domain.no/org is what you need? Did it at least ask you to login?

from dlab.xrm.xrmtoolboxtools.

danielcrenna avatar danielcrenna commented on May 19, 2024

from dlab.xrm.xrmtoolboxtools.

yangs2016 avatar yangs2016 commented on May 19, 2024

Hi, I am getting the same error when trying to run CrmSvcUtil to re-generate Dynamics proxy classes:

Executed this command against on-premise service:
CrmSvcUtil.exe /out:DynamicsCRMProxy.cs /url:https://myCrm.myOrg.com/XRMServices/2011/Organization.svc /domain:myOrg /username:uid@myOrg /password:12345 /namespace:Billing.DynamicsCrm.Contracts.Proxy /serviceContextName:DynamicsProxyContext

And got this in the log:
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Organization not found. Org = XRMServices
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error: 2 : Unable to Login to Dynamics CRM
CrmSvcUtil Error: 2 : Exiting program with exit code 2 due to exception : System.Exception: Connection to CRM is not established. Aborting process.
at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.LoadMetadata(IServiceProvider service)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)
CrmSvcUtil Error: 2 : ===== DETAIL ======
CrmSvcUtil Error: 2 : Source : CrmSvcUtil
Method : LoadMetadata
Date : 8:33:28 AM
Time : 7/27/2018
Error : Connection to CRM is not established. Aborting process.
Stack Trace : at Microsoft.Crm.Services.Utility.SdkMetadataProviderService.LoadMetadata(IServiceProvider service)
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Run()
at Microsoft.Crm.Services.Utility.CrmSvcUtil.Main(String[] args)

Couple of key facts:

  1. I was able to browse to the Svc url and the existing codes from backend, using same connection url and credential still working fine, except for when trying to call service.CreateIncident
  2. I have seen similar error when we upgraded from 2011 to 2016 but resolved it after I downloaded the MicrosoftDynamics365SDK.exe and used the CrmSvcUtil tool from the Sdk/Bin ( version is 8.2.1.8676) folder.
  3. I tried a few things suggested from this board, including replacing Url with connectionString, replacing XRMServices with myOrg, etc but none of them worked at this point.

Your help will greatly appreciated.
Thanks

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

What version are you running? Both of tools and CRM.

Was it working before and has stopped?

Can you connect with other SDK tools?

from dlab.xrm.xrmtoolboxtools.

yangs2016 avatar yangs2016 commented on May 19, 2024

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

I'm confused. Are you using the early bound generator, or any of it's assemblies?

from dlab.xrm.xrmtoolboxtools.

yangs2016 avatar yangs2016 commented on May 19, 2024

from dlab.xrm.xrmtoolboxtools.

daryllabar avatar daryllabar commented on May 19, 2024

@yangs2016 I don't see any DLaB assemblies in your connection string. If you're unable to connect with just the CrmSvcUtil that is a Microsoft issue. Contact them.

from dlab.xrm.xrmtoolboxtools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.