Tôi đang theo dõi this hướng dẫn có khoảng Table Storage Service
. Tôi đang sử dụng phiên bản trình mô phỏng của hướng dẫn mà bạn có thể tìm thấy ở điểm 5 của đoạn "Định cấu hình chuỗi kết nối của bạn khi sử dụng Dịch vụ đám mây".Windows Azure Máy chủ từ xa trả về lỗi: (404) Không tìm thấy
Đây là mã tôi dán trong 'về' ActionResult
:
public ActionResult About()
{
// Retrieve the storage account from the connection string.
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
// Create the table client.
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
// Create the CloudTable object that represents the "people" table.
CloudTable table = tableClient.GetTableReference("people");
// Create a new customer entity.
CustomerEntity customer1 = new CustomerEntity("Harp", "Walter");
customer1.Email = "[email protected]";
customer1.PhoneNumber = "425-555-0101";
// Create the TableOperation that inserts the customer entity.
TableOperation insertOperation = TableOperation.Insert(customer1);
// Execute the insert operation.
table.Execute(insertOperation);
return View();
}
Tại dòng này table.Execute(insertOperation);
tôi nhận được thông báo lỗi sau:
StorageException was unhandled by user code The remote server returned an error: (404) Not Found.
Mẫu dự án Tôi đã từng là "Windows Dịch vụ đám mây Azure ". Cửa sổ tiếp theo xuất hiện, tôi chỉ thêm "ASP.NET MVC 4 Web Role".
Bất kỳ ai cũng có ý tưởng gì gây ra lỗi này?
Xin chào, có vẻ như tôi đã quên kiểm tra xem bảng có tồn tại hay không. – Yustme