Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Azure The remote server returned an error: (404) Not Found

I'm following this tutorial which is about Table Storage Service. I'm using the emulator version of the tutorial which you can find at point 5 of paragraph "Configuring your connection string when using Cloud Services".

This is the code I pasted 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 = "[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();      
}

At this line table.Execute(insertOperation); I get the following error message:

StorageException was unhandled by user code The remote server returned an error: (404) Not Found.

The project template I used was "Windows Azure Cloud Service". The next window that popped up, I only added "ASP.NET MVC 4 Web Role".

Anyone any idea what is causing this error?

like image 420
Yustme Avatar asked Aug 13 '13 08:08

Yustme


1 Answers

Does the people table exists in Storage area? (you can check from Azure management portal)

like image 195
rjha94 Avatar answered Oct 15 '22 21:10

rjha94