简体   繁体   English

crmsvcutil.exe:无法为早期绑定生成实体类 - Dynamics CRM Online

[英]crmsvcutil.exe: Unable to generate entity classes for early binding - Dynamics CRM Online

I am trying to generate early bound entity classes from my Dynamics CRM Online instance. 我试图从我的Dynamics CRM Online实例生成早期绑定的实体类。

I have CRM SDK installed on my machine. 我的计算机上安装了CRM SDK。

I am running following command from the "Bin" folder of SDK. 我正在从SDK的“Bin”文件夹中运行以下命令。

crmsvcutil.exe /url:<<OrganizationServiceUrl>> /out:crmexams3.cs /username:"<<username>>" /password:"<<password>>"

But this gives me following error: 但这给了我以下错误:

Error requesting orgs from the discovery server
Access is denied

I have replaced the OrganizationServiceUrl with the organization service url which I could found from Developer resources in CRM instance. 我已将组织服务URL替换为OrganizationServiceUrl,我可以从CRM实例中的Developer资源中找到它。

My instance is CRM 2016 Online. 我的实例是CRM 2016 Online。

Any idea why this is failing? 知道为什么会失败吗?

Thanks 谢谢

If you put /il as an argument and remove the username and password you can enter the credentials, domain, etc through a XRMTooling Login Control. 如果您将/il作为参数并删除用户名和密码,则可以通过XRMTooling登录控件输入凭据,域等。 Entering it in manually has the benefits of: 手动输入它有以下好处:

  • It will potentially fix your problem. 它可能会解决您的问题。
  • It makes it so you aren't storing credentials somewhere, which is a little bit of a security faux paux. 它使得你不会在某个地方存储凭证,这有点像一个安全的假人造。

Access is denied suggests you have the wrong user name and password provided. Access is denied表示您提供了错误的用户名和密码。

There are examples of how the command line should look here , perhaps your username is in the wrong format? 有一些示例命令行应该在这里看,也许您的用户名格式错误?

The first example is for the Microsoft account identity provider and the second is for the Office 365 identity provider. 第一个示例适用于Microsoft帐户身份提供程序,第二个示例适用于Office 365身份提供程序。

CrmSvcUtil.exe /url:https://myorg.api.crm.dynamics.com/XRMServices/2011/Organization.svc    /out:GeneratedCode.cs /username:"myname@live.com" /password:"myp@ssword!" 

CrmSvcUtil.exe /url:https://myorg.api.crm.dynamics.com/XRMServices/2011/Organization.svc    /out:GeneratedCode.cs /username:"myname@myorg.onmicrosoft.com" /password:"myp@ssword!"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM