1
votes

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.

3
What is the actual 400 error when you run this through Postman? If you watch the debugging, then is anything printed?Adrian Hall
My guess is that you have not added the X-ZUMO-VERSION header to the request though. See azure.microsoft.com/en-us/documentation/articles/…Adrian Hall
@zhe did my answer below help ?Rami Sarieddine

3 Answers

2
votes

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.

1
votes

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/.

-2
votes

Adding

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

at the end will do the trick.