6

Obserwuję this samouczka, który jest o Table Storage Service. Używam wersji emulatora samouczka, które można znaleźć w punkcie 5 paragrafu "Konfigurowanie ciągu połączenia podczas korzystania z usług w chmurze".Windows Azure Zdalny serwer zwrócił błąd: (404) nie została odnaleziona

Jest to kod mam wklejony w „O” 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();  
} 

Na tej linii table.Execute(insertOperation); pojawia się następujący komunikat o błędzie:

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

Szablon projektu Kiedyś była „systemu Windows Usługa chmury Azure ". Następne okno, które pojawiło się, dodałem tylko "ASP.NET MVC 4 Web Role".

ktoś jakiś pomysł co jest przyczyną tego błędu?

Odpowiedz

5

Czy istnieje w tabeli ludzie powierzchni magazynowej? (możesz sprawdzić z portalu zarządzania Azure)

+0

Cześć, tak wydawało się, że zapomniałem sprawdzić, czy tabela istnieje. – Yustme

0

Przyszedłem tutaj po tym samym błędzie (Nie znaleziono, gdy .replace), ale mój przypadek był inny, faktycznie miałem ludzi, ale problem z moim kodem był taki, że byłem aktualizowanie wartości Klucz wiersza. Myślę, że można aktualizować tylko inne pola, ale nie klucze partycji lub klucze wiersza. Pomyślałem tylko o dodaniu tego do odpowiedzi na wypadek, gdyby ktoś inny dostał ten sam problem co ja.

Powiązane problemy