【问题标题】:SOAP exception at service.Fetchservice.Fetch 的 SOAP 异常
【发布时间】: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


【解决方案1】:

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

您可以添加一个 try/catch 块以查看其他错误详细信息吗?

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

【讨论】:

  • "服务器无法处理请求。:\n 0x80040216\n 发生意外错误。\n 平台\n"
  • 我正在使用 CRM SDK 5.0.9 版
  • 如何查看我的 CRM SDK 版本?
  • 我也在使用 5.0.9。但是,它是一个带有 Web 参考的独立解决方案。不确定 sdk 版本与此有什么关系。
  • 抱歉 - 误解了 - 我在 CRM 4.0 上运行了更新汇总 19。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-08-12
相关资源
最近更新 更多