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?
source share