locked
The request failed with HTTP status 400: Bad Request RRS feed

  • Question

  • I'm currently creating an aspx page to get the details of a custom entity (new_customproduct) I've created in CRM 4. As per the SDK I'm using this code to retrieve one of the entity objects, but am getting "The request failed with HTTP status 400: Bad Request"

     

     

     

    CrmAuthenticationToken token = new CrmAuthenticationToken();

    token.AuthenticationType = 0;

    token.OrganizationName = "OrgName";

     

    CrmService service = new CrmService();

    service.Url += "http://crmserver/MSCRMServices/2007/crmservice.asmx";

    service.CrmAuthenticationTokenValue = token;

    service.Credentials = System.Net.CredentialCache.DefaultCredentials;

     

    ColumnSet csCols = new ColumnSet();

    csCols.Attributes = new string[] { "new_edition" };

     

    Guid guidProductId = new Guid("278BBE62-0CE0-DC11-8384-00055D698508");

     

    new_customproduct customproduct = (new_customproduct)service.Retrieve(EntityName.new_customproduct.ToString(), guidProductId, csCols);

     

     

     

    I've tried running this in debug mode in VS2005 and on the CRM IIS server with the same result. I'm at a loss as to why it isn't working.

    What am missing?
    Tuesday, February 26, 2008 5:33 AM

Answers

All replies