locked
CRM2013 Integration: Server was unable to process request RRS feed

  • Question

  • Hi,

           Iam trying to integrate CRM with My Custom Application. This code is working in CRM4.0 and 2011. Now Iam getting error in CRM2013 integration when calling Execute method from MetdataService.

            static void Main(string[] args)
            {
                try
                {

                    RetrieveEntityRequest entityRequest = new RetrieveEntityRequest();
                   
                    entityRequest.LogicalName = EntityName.contact.ToString();
                    entityRequest.RetrieveAsIfPublished = false;
                   
                   entityRequest.EntityItems = EntityItems.All;

                    ConsoleApplication1.metdataservice.CrmAuthenticationToken token1 = new ConsoleApplication1.metdataservice.CrmAuthenticationToken();
                    token1.AuthenticationType = 0;
                    token1.OrganizationName = "CRM13";
                    MetadataService serv = new MetadataService();
                    serv.CrmAuthenticationTokenValue = token1;
                   serv.UseDefaultCredentials = false;
                  serv.Credentials = new System.Net.NetworkCredential("username", "password", "domain");

               

               
                   
                  
                    RetrieveEntityResponse entityResponse = (RetrieveEntityResponse)serv.Execute(entityRequest);
                   //serv.ExecuteAsync(entityRequest);
                  
                    Console.WriteLine("Working");
                  
                }
                catch (Exception error)
                {
                    Console.WriteLine(error.Message);
                }

    Thanks

    vijeesh


    • Edited by vijeeshaug Wednesday, December 4, 2013 7:03 AM
    Wednesday, December 4, 2013 6:59 AM

All replies