相关疑难解决方法(0)

Azure表存储返回400 Bad Request

我在调试模式下运行它,并附上一个包含异常细节的图像.我怎么知道出了什么问题?我试图在表格中插入数据.天蓝不能给我更多细节?

Obs:存储在Windows Azure上而不在我的机器上.表已创建,但插入数据时出现此错误

在此输入图像描述

// Retrieve the storage account from the connection string.
Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount = Microsoft.WindowsAzure.Storage.CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=***;AccountKey=***");

// Create the table client.
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();

// Create the table if it doesn't exist.
CloudTable table = tableClient.GetTableReference("EmployeeOnlineHistory");
table.CreateIfNotExists();
Run Code Online (Sandbox Code Playgroud)

这是插入代码:

public static void SetStatus(Employee e, bool value)
{
    try
    {
        // Retrieve the storage account from the connection string.
        Microsoft.WindowsAzure.Storage.CloudStorageAccount storageAccount = Microsoft.WindowsAzure.Storage.CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=###;AccountKey=###");

        // Create the table client.
        CloudTableClient tableClient = storageAccount.CreateCloudTableClient();

        // Create the CloudTable object that represents the "people" …
Run Code Online (Sandbox Code Playgroud)

c# exception azure azure-table-storage

111
推荐指数
5
解决办法
6万
查看次数

标签 统计

azure ×1

azure-table-storage ×1

c# ×1

exception ×1