Я пытаюсь загрузить вложения и заметки из сущности Контракт в среде crm4 для загрузки в среду crm 2011.
Я получаю исключение SOAP в строке (// String result = service.Fetch (sfetch);)
// --------- 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);