zhe
zhe

Reputation: 2427

Just created Azure Mobile App service calls return http 400 error

Here's what I'm doing.

  1. Install latest Azure SDK (by the date)
  2. Open Visual Studio 2013
  3. Create a new Azure Mobile App project. The simple service is created with TodoItem DataObject and 2 simple controllers - TodoItemController and ValuesController
  4. Do not change anything
  5. Start the project

The service is started and hosted in local IISExpress on url http://localhost:50993/ (the port may vary). The "This mobile app is up and running" web page is opened in the browser. But http 400 error is returned when I try to invoke some GET-actions: for example http://localhost:50993/api/values or http://localhost:50993/tables/TodoItem.

Any ideas? Is something wrong in my environment or is that me doing something wrong?

Thanks.

Upvotes: 1

Views: 436

Answers (3)

Yashwanth
Yashwanth

Reputation: 1

Adding

http://localhost:50993/tables/Location?ZUMO-API-VERSION=2.0.0

at the end will do the trick.

Upvotes: -2

Rami Sarieddine
Rami Sarieddine

Reputation: 5432

I guess you can opt out of version checking by setting a value of true for the app setting MS_SkipVersionCheck. Specify this either in your web.config or in the Application Settings section of the Azure Portal.

Upvotes: 2

lindydonna
lindydonna

Reputation: 3875

This generally happens when you don't add a ZUMO-API-VERSION header to the request. This is required when making requests from a REST client, but the mobile client SDKs add the header automatically.

To fix, add the header ZUMO-API-VERSION with value of 2.0.0. To learn more, see https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-client-and-server-versioning/.

Upvotes: 1

Related Questions