Accessing Azure Tables from within a virtual netwo

2019-08-24 18:19发布

问题:

Is there any way to access an azure table using the API from within a virtual network? The storage account was created pre-virtual network. Currently, the code works fine (a test worker role) that creates a table, but fails when I place it inside a virtual network.

It's not possible to report on the exception being thrown as nothing is shown in diagnostics

         CloudTable table = tableClient.GetTableReference("test");
         bool retVal = table.CreateIfNotExists();

Thanks

回答1:

I'm not sure how you're creating your table client, but Table Storage access, via REST calls (or through SDKs which then make REST calls) is done directly to the storage account, which cannot be added to a virtual network.

All storage calls will work, whether you're making those calls from an on-premises app, an app in a non-vnet VM/cloud service/web app/mobile app, or something within a vnet.