无法登录动态crm organizationserviceproxy为null organizationwebproxyclient为null

时间:2017-06-22 11:39:20

标签: azure-web-sites dynamics-crm-2016

由于旧的连接到CRM Online已被弃用,我们必须使用CRM 2017 Online的新方法。 以下过程在本地开发系统中运行良好,但不在目标区域(Azure Web App:

)中运行
CrmConnectionString = "AuthType=Office365; Url=https://<Org>.api.crm4.dynamics.com; Username=<User>; Password=<PW>;"
CrmServiceClient conn = new CrmServiceClient(CrmConnectionString);

也尝试过:

CrmServiceClient conn = 
new CrmServiceClient(
"<User>", 
CrmServiceClient.MakeSecureString("<PW>"),
string.Empty,
"<Org>", 
useUniqueInstance: false, useSsl: true, isOffice365: true);

基于https://community.dynamics.com/crm/f/117/t/188785也添加到web.config:

<system.net>
 <defaultProxy useDefaultCredentials="true"/>
</system.net>

也可以试试https://blog.vertica.dk/2016/03/04/crm-2016-unable-to-login-to-dynamics-crm/

WEAPITE_LOAD_USER_PROFILE = 1在appsettings

什么都没发生。

验证数据和地址是正确的。它只在Azure环境中失败。

任何解决方案?

1 个答案:

答案 0 :(得分:0)

根据Kudu Configurable settings,WEBSITE_LOAD_USER_PROFILE仅适用于以基本或标准模式运行的网站。请检查您选择的Web App Plan定价计划?

您还可以使用Azure Kudu网站检查是否已成功应用WEBSITE_LOAD_USER_PROFILE。在CMD页面上,使用“CD D:\ Users”命令重定向到“用户”文件夹,您将看到一个与您的Web应用程序同名的用户。如果特定用户不存在,则表示尚未加载USER_PROFILE。

CD D:\Users

enter image description here