locked
Insert data to cloud table RRS feed

  • Question

  • I have a simple web application from where I need to insert a row in the cloud table. I am using the following code. But it throws an exception -  Exception of type 'Microsoft.WindowsAzure.StorageClient.StorageClientException' was thrown.

    Inner exception  - <?xml version="1.0" encoding="utf-8" standalone="yes"?>
    <error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
      <code>OutOfRangeInput</code>
      <message xml:lang="en-US">One of the request inputs is out of range.
    RequestId:851db89b-e5a4-436d-9e76-c99ec220b4ee
    Time:2010-11-26T09:16:59.5193535Z</message>
    </error>

    Code used -

    StorageCredentialsAccountAndKey storageCredentialsAccountAndKey = new StorageCredentialsAccountAndKey("AccountName", "key");
                    CloudStorageAccount csa = new CloudStorageAccount(storageCredentialsAccountAndKey, true);
                    var cloudTableClient = csa.CreateCloudTableClient();
                    IEnumerable<string> tableNames   = cloudTableClient.ListTables();
                    int totaTables = tableNames.Count();

    Friday, November 26, 2010 9:20 AM

Answers

  • Thanks for the reply

    Of course I am replacing the account name and key with the proper values. I have resolved the issue . The cloud storage name in my code  had to be in small case which I was not aware of. It may seem dumb but I am pretty new to azure and I thought irrespective of the type of question, I could get a solution or atleast some hint to sort out my issues.

    • Proposed as answer by Gaurav Mantri Friday, November 26, 2010 2:06 PM
    • Marked as answer by Mog Liang Friday, December 3, 2010 10:07 AM
    Friday, November 26, 2010 1:48 PM

All replies

  • Hi Amrita,

    Can you debug your code and see which line in your code above this throwing the exception? Also kind of dumb question, but you're replacing "AccountName" and "key" with the actual values. Is that correct?

    Thanks

    Gaurav Mantri

    Cerebrata Software

    http://www.cerebrata.com

    Friday, November 26, 2010 10:54 AM
  • Thanks for the reply

    Of course I am replacing the account name and key with the proper values. I have resolved the issue . The cloud storage name in my code  had to be in small case which I was not aware of. It may seem dumb but I am pretty new to azure and I thought irrespective of the type of question, I could get a solution or atleast some hint to sort out my issues.

    • Proposed as answer by Gaurav Mantri Friday, November 26, 2010 2:06 PM
    • Marked as answer by Mog Liang Friday, December 3, 2010 10:07 AM
    Friday, November 26, 2010 1:48 PM