【发布时间】:2012-02-28 17:11:52
【问题描述】:
我正在尝试从 crm4 环境中的 Contract 实体下载附件和注释以上传到 crm 2011 环境。
我在行 (//String result = service.Fetch(sfetch);) 处收到 SOAP 异常
// --------- Server Name -----------
string OrgName = "USF";
string CrmSite = "http://crm4";
string TmpFolder = "C:\\TempAnnotation\\";
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.AuthenticationType = 0;
token.OrganizationName = OrgName;
CrmService service = new CrmService();
service.Url = CrmSite + "/mscrmservices/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;
//service.Credentials = System.Net.CredentialCache.DefaultCredentials;
service.Credentials = new System.Net.NetworkCredential("username", "password", "domain");
string sfetch = @"<fetch mapping='logical'><entity name='contract'>
<attribute name='modifiedon' />
<attribute name='title' />
<link-entity name='annotation' from='objectid' to='contractid'>
<attribute name='annotationid'/>
<attribute name='createdon'/>
<attribute name='createdby'/>
<attribute name='documentbody'/>
<attribute name='filename'/>
<attribute name='isdocument'/>
<attribute name='mimetype'/>
<attribute name='notetext'/>
</link-entity>
</entity>
</fetch>
";
String result = service.Fetch(sfetch);
【问题讨论】:
-
System.Web.Services.Protocols.SoapException 未处理消息=服务器无法处理请求。 Source=System.Web.Services Actor="" Lang="" Node="" Role=""
-
结果中是否有可能超过 10000 条记录?
标签: dynamics-crm dynamics-crm-4