How to create a distribution? I get BadRequest

Nov 28, 2008 at 3:02 PM
Hello,
Thanks for the great lib, as always.
Just, I'm unable to create a distribution, I'm getting the message:
ex.Message = "The XML you provided was not well-formed or did not validate against our published schema."

My code is the following:
            string awsAccessKeyId = "my key";
            string awsSecretAccessKey = "my secret key";

            ThreeSharpConfig config = new ThreeSharpConfig();
            config.AwsAccessKeyID = awsAccessKeyId;
            config.AwsSecretAccessKey = awsSecretAccessKey;

            service = new ThreeSharpQuery(config);

    DistributionConfig config = new DistributionConfig();
    //the bucket designated for that distribution
            config.Origin = "testname"; // +".s3.amazonaws.com";
            config.Enabled = true;
            //config.Comment = "My distribution";
            //a unique id used as caller reference
            config.CallerReference = "20080930090000"; // Guid.NewGuid().ToString();
            using (DistributionAddRequest request = new DistributionAddRequest(config))
            {
                using (DistributionAddResponse response = service.DistributionAdd(request))
                {
                    Console.WriteLine(response.StreamResponseToString());
                }
            }

Would you be so kind and show my a code sample of how to create a distribution?
Thanks a lot in advance,
John