I have created a backend service using Azure Mobile App. Offline sync works fine with mobile clients using provided SDK. All the controllers that I have used are TableController. Now I want to add a simple Web API 2 controller ApiController, that will not be used by mobile clients.
Here is a simple ApiController that I have added to Controllers folder:
public class SimpleController : ApiController
{
public string Get()
{
return "Hello";
}
}
But the controller is never hit. If I add [MobileAppController] attrebute to the controller, it works but now it asks for additional headers in the request (I guess this headers are sent by client SDK):
{"message":"No API version was specified in the request, this request needs to specify a ZUMO-API-VERSION of '2.0.0'. For more information and supported clients see: http://go.microsoft.com/fwlink/?LinkId=690568#2.0.0"}
But I do not need this additional functionality here - I just want my service to respond to simple GET requests. Although the guide states that it is not necessary to decorate the class:
Any controller that does not have
MobileAppControllerAttributeapplied can still be accessed by clients, but it may not be correctly consumed by clients using any Mobile App client SDK.
I can not achieve this. Am I missing something?
Thanks