Код:
ICrmService service = context.CreateCrmService(true);
Необходимо поменять на
Код:
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.AuthenticationType = AuthenticationType.AD;
token.OrganizationName = context.OrganizationName;
CrmService service = new CrmService();
service.UseDefaultCredentials = true;
service.Url = (string)(Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\MSCRM").GetValue("ServerUrl")) + "/2007/crmservice.asmx";
service.CrmAuthenticationTokenValue = token;