Dynamics 365 for CE (CRM) v9 Package Deployer 无法连接到组织
Dynamics 365 for CE (CRM) v9 Package Deployer won't connect to org
我已经有了答案,但想 post 供其他人查找。
我从 FS and PSA Demo Data 下载 FS/PSA 演示数据并尝试 运行 针对 CRM v9 组织的 PD 时遇到了这个问题。在我的一个租户的 5 个沙箱中,它无法连接到其中的 3 个。所有都是 v9 并且有 FS/PSA 定位。问题的第一个症状是 PD 会接受我的登录信息,让我选择一个我的组织,然后带我回到登录页面。检查位于 %appdata%\Microsoft\Microsoft Dynamics® CRM Package Deployer.0.0.848\PackageDeployer_[token]-[date].log 的日志文件后,我看到错误:"Unauthorized Http Status Code (401) was expected in the response".
这是日志文件中的完整错误:
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information 8 12/19/2017 10:54:48 AM ConnectAndInitCrmOrgService - Requesting connection to Organization with CRM Version: 9.0.0.3172
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 12/19/2017 10:54:48 AM ERROR REQUESTING Token FROM THE Authentication context
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 12/19/2017 10:54:48 AM Source : Microsoft.IdentityModel.Clients.ActiveDirectory
Method : CreateFromUnauthorizedResponseCommon
Date : 12/19/2017
Time : 10:54:48 AM
Error : Unauthorized Http Status Code (401) was expected in the response
Parameter name: response
Stack Trace : at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters.CreateFromUnauthorizedResponseCommon(IHttpWebResponse response)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters.CreateFromUnauthorizedResponse(HttpWebResponse response)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.GetAuthorityFromTargetService(Uri targetServiceUrl) in c:\bt2589\r\de3ae9\src\DynamicsCrmToolbox\Utilities\Microsoft.Uii.AddOn.DynamicsCRM.Connector\CRMWebSvc.cs:line 1815
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ExecuteAuthenticateServiceProcess(Uri serviceUrl, ClientCredentials clientCredentials, X509Certificate2 userCert, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, Uri& targetServiceUrl, AuthenticationContext& authContext, String& resource, CrmLogEntry logSink) in c:\bt2589\r\de3ae9\src\DynamicsCrmToolbox\Utilities\Microsoft.Uii.AddOn.DynamicsCRM.Connector\CRMWebSvc.cs:line 1703
解决此问题的方法是将以下 2 个条目添加到您的注册表中:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=双字:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=双字:00000001
然后重启PD(不需要重启系统)。嗯!
我已经有了答案,但想 post 供其他人查找。
我从 FS and PSA Demo Data 下载 FS/PSA 演示数据并尝试 运行 针对 CRM v9 组织的 PD 时遇到了这个问题。在我的一个租户的 5 个沙箱中,它无法连接到其中的 3 个。所有都是 v9 并且有 FS/PSA 定位。问题的第一个症状是 PD 会接受我的登录信息,让我选择一个我的组织,然后带我回到登录页面。检查位于 %appdata%\Microsoft\Microsoft Dynamics® CRM Package Deployer.0.0.848\PackageDeployer_[token]-[date].log 的日志文件后,我看到错误:"Unauthorized Http Status Code (401) was expected in the response".
这是日志文件中的完整错误:
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Information 8 12/19/2017 10:54:48 AM ConnectAndInitCrmOrgService - Requesting connection to Organization with CRM Version: 9.0.0.3172
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 12/19/2017 10:54:48 AM ERROR REQUESTING Token FROM THE Authentication context
Microsoft.Xrm.Tooling.Connector.CrmServiceClient Error 2 12/19/2017 10:54:48 AM Source : Microsoft.IdentityModel.Clients.ActiveDirectory
Method : CreateFromUnauthorizedResponseCommon
Date : 12/19/2017
Time : 10:54:48 AM
Error : Unauthorized Http Status Code (401) was expected in the response
Parameter name: response
Stack Trace : at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters.CreateFromUnauthorizedResponseCommon(IHttpWebResponse response)
at Microsoft.IdentityModel.Clients.ActiveDirectory.AuthenticationParameters.CreateFromUnauthorizedResponse(HttpWebResponse response)
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.GetAuthorityFromTargetService(Uri targetServiceUrl) in c:\bt2589\r\de3ae9\src\DynamicsCrmToolbox\Utilities\Microsoft.Uii.AddOn.DynamicsCRM.Connector\CRMWebSvc.cs:line 1815
at Microsoft.Xrm.Tooling.Connector.CrmWebSvc.ExecuteAuthenticateServiceProcess(Uri serviceUrl, ClientCredentials clientCredentials, X509Certificate2 userCert, UserIdentifier user, String clientId, Uri redirectUri, PromptBehavior promptBehavior, String tokenCachePath, Boolean isOnPrem, String authority, Uri& targetServiceUrl, AuthenticationContext& authContext, String& resource, CrmLogEntry logSink) in c:\bt2589\r\de3ae9\src\DynamicsCrmToolbox\Utilities\Microsoft.Uii.AddOn.DynamicsCRM.Connector\CRMWebSvc.cs:line 1703
解决此问题的方法是将以下 2 个条目添加到您的注册表中:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.NETFramework\v4.0.30319] "SchUseStrongCrypto"=双字:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft.NETFramework\v4.0.30319] "SchUseStrongCrypto"=双字:00000001
然后重启PD(不需要重启系统)。嗯!