我使用的是CRMV9.1,需要为我团队中的数据架构师创建一个来自D365的E/R图。我知道...I know....why我不是只使用xRM工具箱提供的E/R图创建器吗?好吧,xRM工具箱提供的工具只允许我将文件保存为.erd。我的数据架构师开始使用Erwin,并且一直在努力将.erd文件导入到Erwin中,但没有失败。因此,我找到了一个变通方法,可以使用Dynamics 365 - Entities ER Diagram ( Visio ),使用SDK中的Metadata Diagram控制台(这将允许我将输出的Visio文件导入Erwin):https://www.microsoft.com/en-us/download/confirmation.aspx?id=50032。这是针对8.x的,但是可以通过修改https://sachinbansal.blog/2018/03/29/dynamics-365-entities-er-diagram-visio-using-metadata-diagram-console-in-sdk/后面的代码来解决这个问题。问题是,我已经完全按照声明修改了后台代码,但收到了以下错误:

下面是允许通过TLS 1.2与9.x通信的代码块,我已经做出了建议的修改,但仍然收到错误。
try
{
// Obtain the target organization’s Web address and client logon
// credentials from the user.
//ServerConnection serverConnect = new ServerConnection();
//ServerConnection.Configuration config = serverConnect.GetServerConfiguration();
string strUrl = string.Empty;
strUrl = “https://<orgname>.api.crm9.dynamics.com/XRMServices/2011/Organization.svc“;
ClientCredentials credential = new ClientCredentials();
credential.UserName.UserName = “*********.onmicrosoft.com”;
credential.UserName.Password = “***************”;
// Set security protocol to TLS 1.2 for version 9.0 of Customer Engagement Platform
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
// Connect to the Organization service.
// The using statement assures that the service proxy will be properly disposed.
using (_serviceProxy = new OrganizationServiceProxy(new Uri(strUrl), null, credential, null))
{
// This statement is required to enable early-bound type support.
_serviceProxy.EnableProxyTypes();
_serviceProxy.Timeout = TimeSpan.MaxValue;
// Load Visio and create a new document.
application = new VisioApi.Application();
application.Visible = false; // Not showing the UI increases rendering speed
builder.VersionName = application.Version;
document = application.Documents.Add(String.Empty);
builder._application = application;
builder._document = document;发布于 2019-10-03 03:40:13
此问题的解决方案是从CRM中删除特定于8.x版的所有引用,并重新加载9.x版开发指南程序集,然后重新构建针对.NET 4.6.1版的解决方案。
https://stackoverflow.com/questions/58206474
复制相似问题