MS Dynamics CRM Online中2011 - 身份验证问题 [英] MS Dynamics CRM online 2011 - Authentication issues

查看:180
本文介绍了MS Dynamics CRM Online中2011 - 身份验证问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个总的新手使用Dynamics CRM Online中(2011年),虽然我一直在通过SDK示例code的工作,我想找到执行我们的在线动态CRM基本身份验证的连接的最简单方法服务,并推动一些非常基本的数据,我创建了一个自定义实体/扩展。

I am a total newbie with dynamics crm online (2011), and although I have been working through the SDK sample code, I am trying to find the simplest way to perform a basic authenticated connection to our online Dynamics CRM service, and push some very basic data to a custom entity/extension I have created.

希望你可以从上面的code片段中看到的(敏感数据模糊),我可能试图绕过身份验证过程?上述code例子是基于一个小一些的CRM SDK中的code样本,也从的一个code工程实例。我不知道,如果code以上会甚至工作?实际上它似乎尝试,只有当serviceProxy.Create被执行我得到一个验证错误。

Hopefully you can see from the above code snippet (sensitive data blurred), I am probably trying to circumvent the authentication process? The above code example was based a little on some of the code samples in the CRM SDK, and also from a code project example. I don't know if the code above would even work? actually it seems to try, and only when the "serviceProxy.Create" is executed do I get an authentication error.

我也成功地浏览了企业防火墙有以下除了我的app.config文件:

I have also managed to navigate out of the corporate firewall with the following addition to my app.config file:

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

此外,不知道是否有一个连接很基本的方法是什么?或者我应该真正回落到SDK帮助文件?

Again, not sure if there is a very basic way to connect? or should I really fall back to the SDK helper files?

推荐答案

这是连接到CRM Online的最简单的方法,你只需要添加引用 Microsoft.Xrm.Sdk.Client Microsoft.Xrm.Client.Services

This is the simplest way to connect to CRM Online, you need only to add reference to Microsoft.Xrm.Sdk.Client and Microsoft.Xrm.Client.Services

CrmConnection crmConnection = CrmConnection.Parse("Url=https://XXX.crm.dynamics.com; Username=user@domain.onmicrosoft.com; Password=passwordhere;");
OrganizationService service = new OrganizationService(crmConnection);

Entity account = new Entity("account");
account ["name"] = "Test Account";

Guid accountId = service.Create(account); 

指的是用于建立正确的连接字符串这个MSDN文章

Refers to this msdn article for create the right connection string

简化连接到Microsoft Dynamics CRM

这篇关于MS Dynamics CRM Online中2011 - 身份验证问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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