CRMServiceClient不会尝试连接到Dynamics CRM [英] CRMServiceClient does not try to connect to Dynamics CRM

查看:583
本文介绍了CRMServiceClient不会尝试连接到Dynamics CRM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用最新的Dynamics CRM SDK,我尝试创建一个新的CRMServiceClient([ConnectionString]).我尝试使用它做任何事情,包括WHOAMI请求,但我无法登录到Dynamics OrganizationServiceProxy为null.当我运行提琴手时,什至没有尝试与服务器通信以尝试登录的尝试.我不确定是什么问题,因为我原本认为由于CRMServiceService是CRMServiceClient的子对象,所以更新CRMServiceClient会尝试进行连接.任何人都有解决该问题的想法吗?

Using the latest SDK for Dynamics CRM, I am attempting to create a new CRMServiceClient([ConnectionString]). I try to do anything with it including a WHOAMI request, and I get Unable to Login to Dynamics OrganizationServiceProxy is null. When I run fiddler, nothing is even attempting to communicate to the server to attempt a login. I am unsure what is wrong, as I would have thought newing up a CRMServiceClient would have tried to connect since OrganizationServiceProxy is a child object of CRMServiceClient. Anyone have any ideas how to approach solving this?

var temp = new CrmServiceClient(ConfigurationManager.ConnectionStrings["con‌​n"].ConnectionString‌​); 

<add name="conn" connectionString="AuthType=AD; Url=Url/DEVCRM; Username=User; Password=pass;"/> 

推荐答案

请注意,CrmServiceClient具有一个名为

Please note that CrmServiceClient has a boolean property called IsReady, which is a good way to check if it's in a proper state.

作为参考,以下是各种环境类型的示例连接字符串:

And for reference, here are example connection strings for the various environment types:

CRM 2016和Dynamics 365在线:

CRM 2016 and Dynamics 365 online:

<add name="dev26" connectionString="Url=https://dev26.crm.dynamics.com; Username=user@dev26.onmicrosoft.com; Password=Pass; AuthType=Office365" />

具有集成安全性的内部部署

On-premise with integrated security:

<add name="prod" connectionString="Url=http://myserver/AdventureWorksCycle;"/>

带有凭据的内部部署:

<add name="prod" connectionString="Url=http://myserver/AdventureWorksCycle; Domain=mydomain; Username=administrator; Password=password; AuthType=AD;"/>

CRM 2016之前的本地IFD:

On-premise IFD before CRM 2016:

<add name="prod" connectionString="Url=https://contoso.litware.com; Username=someone@litware.com; Password=password; AuthType=IFD;"/>

用于CRM 2016及更高版本(v8.0 +)的本地IFD

On-premise IFD for CRM 2016 and later (v8.0+)

<add name="prod" connectionString="ServiceUri=https://contoso.litware.com/contoso; Domain=contoso; Username=contoso\administrator; Password=password; AuthType=IFD; LoginPrompt=Never;" />

这篇关于CRMServiceClient不会尝试连接到Dynamics CRM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆