Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Exception of type 'Microsoft.WindowsAzure.StorageClient.StorageClientException' was thrown.

Sometimes even if we have the fabric running and the role manager is up, we get an exception of this sort.  

The code breaks at the line in BOLD.


public EmailAddressDataContext(CloudStorageAccount account) :
            base(account.TableEndpoint.AbsoluteUri, account.Credentials)
        {
            this.storageAccount = account;

            CloudTableClient emailAddressClient =
                new CloudTableClient(storageAccount.TableEndpoint.AbsoluteUri, storageAccount.Credentials);
            emailAddressClient.CreateTableIfNotExist("EmailAddress");
        }

 

Easy fix is to change EmailAddress to Emailaddress. For some reasons it would not allow CamelCasing. So please make sure, you just have one capital letter in the name of the table that too at the beginning. Since the table names are case insensitive, you can also name it as 'emailaddress' . However, make sure that you do not access it with a different case. Follow the next post to have a better idea of what I am suggesting.

No Comments