Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Dynamics crm service.Fetch处出现SOAP异常_Dynamics Crm_Dynamics Crm 4 - Fatal编程技术网

Dynamics crm service.Fetch处出现SOAP异常

Dynamics crm service.Fetch处出现SOAP异常,dynamics-crm,dynamics-crm-4,Dynamics Crm,Dynamics Crm 4,我正在尝试从crm4环境中的合同实体下载附件和注释,以上载到crm 2011环境 我在第//String result=service.Fetchsfetch行得到一个SOAP异常 // --------- Server Name ----------- string OrgName = "USF"; string CrmSite = "http://crm4"; string TmpFolder = "C:\\TempAnnotation\\"; CrmAuthenticationToke

我正在尝试从crm4环境中的合同实体下载附件和注释,以上载到crm 2011环境

我在第//String result=service.Fetchsfetch行得到一个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);

当我尝试时,你的代码运行良好

是否可以添加这样的try/catch块以查看其他错误详细信息

catch (System.Web.Services.Protocols.SoapException ex)
{
     string error = ex.Message + " : " + ex.Detail.InnerText;
}

System.Web.Services.Protocols.SoapException未经处理消息=服务器无法处理请求。Source=System.Web.Services Actor=Lang=Node=Role=结果中的记录可能超过10000条?服务器无法处理请求:\n 0x80040216\n发生意外错误。\n平台\n我正在使用v。CRM SDK的5.0.9我该如何检查我的CRM SDK版本?我也在使用5.0.9。但是,它是一个带有web引用的独立解决方案。不确定sdk版本与此有何关系。抱歉-误解-我在应用更新汇总19的情况下运行了CRM 4.0。