这是一个简单的任务,但我浪费了一天多的时间。那就是为什么来找你。请帮我解决问题。Online CRM REST服务 - 遇到问题
我的要求很简单,我有一个ASP.NET项目。我已经在在线CRM
实体名称的实体:“雇员”和字段“姓名,年龄,性别”
我上无法在我的asp.net项目中添加CRM的DLL。所以我必须使用REST服务。
我已经添加服务引用https://myoffice.crm5.dynamics.com/xrmservices/2011/organization.svc?wsdl
这是我使用
OrganizationServiceClient orgClient = new OrganizationServiceClient();
orgClient.ClientCredentials.Windows.ClientCredential = new System.Net.NetworkCredential("[email protected]", "mypassword");
Entity myContact = new Entity();
myContact.LogicalName = "Employee"; //Is it right? i must provide it here right.
代码当它运行orgClient.Create(myContact)错误
myAttColl.Add(new KeyValuePair<string, object>("Name","Emp1"));
myAttColl.Add(new KeyValuePair<string, object>("Age", "26"));
myAttColl.Add(new KeyValuePair<string, object>("Gender", "Male"));
myContact.Attributes = myAttColl;
try
{
orgClient.Create(myContact);
}
catch (Exception ex)
{
}
我收到 “的消息验证安全性时发生错误”。
不管我到目前为止做了什么。这是我的要求,使用REST服务非常简单地将我的自定义实体添加到Online CRM中。我将在一个名为http://xyz.com的独立域中运行我的web应用程序。从这里,我需要将条目添加到Online CRM中。
任何帮助?
您遇到了一个问题,或者您遇到问题? – Shai 2012-07-19 09:31:06
我感到一个问题。我不知道为什么我得到“验证邮件安全性时发生错误”,我需要解决它。 – 2012-07-19 12:16:26