none
CloudTableClient.CreateIfNotExists throws StorageException

    Question

  • Anyone else having this problem? I'm following the quickstart guide "Get Started with Azure Table storage using .Net" with the following code:

                var storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
                var tableClient = storageAccount.CreateCloudTableClient();
                var table = tableClient.GetTableReference("people");
                table.CreateIfNotExists();


    Which throws a StorageException - {"The remote server returned an error: (503) Server Unavailable."}

    Creating a CloudBlobContainer like this works fine....

                var storageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
                var blobClient = storageAccount.CreateCloudBlobClient();
                var container = blobClient.GetContainerReference("mycontainer");
                container.CreateIfNotExists();


    I'm on VS2015 & using WindowsAzure.Storage v8.1.1


    Thursday, March 30, 2017 12:09 PM

Answers

  • Bypassing the proxy gives me a StorageException "The remote name could not be resolved: <myStorageAccountName>.table.core.windows.net

    a stack overflow question (that I don't have permission to link to) finally pointed me at the answer - tables are not supported on Zone-Redundant Storage accounts, arrgh

    Created a new account with Locally Redundant Storage and I can now create tables. :)

    • Proposed as answer by Md Shihab Thursday, April 6, 2017 11:24 AM
    • Marked as answer by Mike Perrin Tuesday, April 11, 2017 9:23 AM
    Thursday, April 6, 2017 7:40 AM

All replies

  • Hmmm, still getting this. Also occurs if I use .Create(). Anyone have any ideas?
    Friday, March 31, 2017 12:29 PM
  • Could you try using the CreateIfNotExistsAsync() method to see if it lets you create a table. A similar issue has been discussed in this thread on Stackoverflow that you may want to refer.

    Saturday, April 1, 2017 8:32 PM
  • 503 indicates throttling on the storage account. Could you paste in the result of calling ToString() on the StorageException?
    Sunday, April 2, 2017 4:39 PM
  • Thanks for the reply and ideas. CreateIfNotExistsAsync exhibits the same failure.

    Breaking out Fiddler allows me to see that my proxy is failing to resolve the address <myStorageAccountName>.table.core.windows.net, and so returning a 503

    Not sure why this would be the case, does anyone have any ideas?



    Tuesday, April 4, 2017 11:38 AM
  • This sounds like an internal error in the proxy. Can you try bypassing the proxy to confirm that things work otherwise?
    Tuesday, April 4, 2017 3:57 PM
  • Bypassing the proxy gives me a StorageException "The remote name could not be resolved: <myStorageAccountName>.table.core.windows.net

    a stack overflow question (that I don't have permission to link to) finally pointed me at the answer - tables are not supported on Zone-Redundant Storage accounts, arrgh

    Created a new account with Locally Redundant Storage and I can now create tables. :)

    • Proposed as answer by Md Shihab Thursday, April 6, 2017 11:24 AM
    • Marked as answer by Mike Perrin Tuesday, April 11, 2017 9:23 AM
    Thursday, April 6, 2017 7:40 AM