Windows Azure Remote Server responded with an error: (404) Not Found

I am following this tutorial which is dedicated to Table Storage Service . I am using the version of the tutorial emulator that you can find in paragraph 5 of the paragraph "Configuring your connection string when using cloud services".

This is the code I inserted in the 'About' 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 = " Walter@contoso.com "; 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(); } 

In this line table.Execute(insertOperation); The following error message appears:

StorageException was not handled by user code. Remote server returned error: (404) Not found.

The project template I used was the Windows Azure Cloud Service. In the next window that appeared, I added "ASP.NET MVC 4 Web Role".

Does anyone know what causes this error?

+6
source share
2 answers

Is there a table of people in the storage area? (you can check from the Azure management portal)

+5
source

I came here after receiving the same error (not found when .replace), but my case was different, I actually had a table of people, but the problem with my code is that I updated the value of the Row key. I think you can only update other fields, but not section keys or row keys. Just thought to add this to the answers if someone else gets the same problem as me.

0
source

Source: https://habr.com/ru/post/951607/


All Articles