2017-04-11 71 views
2

我正在設置生產版本並因此在門戶中創建所有新服務。我正在努力創建一個存儲帳戶,這將允許我創建Azure表。目前我正在使用NLOG Azure存儲,並且在需要時總是創建表(如果我手動刪除它們,請重新運行我的應用程序,它將重新創建)。Azure門戶中缺少表存儲

如果我嘗試手動創建表我得到一個錯誤(見下面的代碼)

CloudStorageAccount storageAccount = CloudStorageAccount.Parse(Configuration.AzureStorageConnectionString); 
// Create the table client. 
CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); 
CloudTable table = tableClient.GetTableReference("TestTable"); 
// Create the CloudTable if it does not exist 
bool test = table.CreateIfNotExists(); 

我很容易,但無法創造斑點用表。我們以前的(分段)存儲帳戶是在舊門戶上創建的,如果這有所作爲?

這裏是我的配置:

<add key="AzureStorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=productionhalostorage;AccountKey=abc;EndpointSuffix=core.windows.net" 
    xdt:Transform="Replace" 
    xdt:Locator="Match(key)" /> 

忽略XDT的我使用慢獵豹維護我們的configs。

+1

你能分享你得到的錯誤嗎? – Aravind

回答

2

請檢查有問題的存儲帳戶的類型。它應該是Standard存儲帳戶,而不是Blob Storage帳戶,因爲Blob Storage帳戶不支持表。

如果賬戶類型爲Standard,請檢查該賬戶的冗餘類型。它不應該是ZRSPremium LRS,因爲這些冗餘類型也不支持表。

+0

好東西!非常感謝! – David