Im Still new in Azure Mobile App Service, i have question about Azure Mobile App Service , Can we make 2 Api and publish it to Azure Mobile App Service. Example my App Service is http://netbackends.azurewebsites.net and i have 2 Web Api that i want to add in the App Service, for instance the web api is one for CRUD users data and the other one is for Payment. Can we do that in App service ? And make Endpoint for calling the Api, example http://netbackends.azurewebsites.net/CRUD or http://netbackends.azurewebsites.net/payment , or we only can have one Api in App service ?
Asked
Active
Viewed 86 times
1 Answers
1
And make Endpoint for calling the Api, example http://netbackends.azurewebsites.net/CRUD or http://netbackends.azurewebsites.net/payment
Sure, we could add the custom APIs as we want. The following is the demo how to add the custom API for a Mobile App. You also could refer to this book to get more information.
1.Create mobile App with VS
2.Add the custom control
3.If we want to use the custom route path we could add the following code in the Startup.MobileApp.cs file
config.MapHttpAttributeRoutes();
settings.SkipVersionCheck = true; //just for test
- Add mapped route in the control
- Publish it to azure as mobile service and check the result.

Tom Sun - MSFT
- 24,161
- 3
- 30
- 47
-
In your example you create 2 controller in one Azure Mobile App Api, i have example if i want to make payment as Azure Mobile App Api and the CRUD As another Azure Mobile App Api (to make it organize) and then publish it to Azure Will it work or it will replace The Payment Azure Mobile App Api and make me cant call the payment routes, or it will works as long as the route name is diferent ? thanks for your answer – Theodorus Agum Gumilang Dec 06 '17 at 08:53
-
What does `to make it organize` meanings? Do you mean that you have 2 mobile API projects? We could easily to implement it with 2 controls in the Mobile app. If you try to publish 2 mobile api projects one by one, it may replace the first one. – Tom Sun - MSFT Dec 06 '17 at 09:06
-
my idea is to create Many API in one solution, example my solution name is AppService and it will contain a few Api like Payment API , CRUD API, Order API, so its look like microservice and it will easier to maintance . but as you said if it will replace the first one, i will stick with controllers. – Theodorus Agum Gumilang Dec 06 '17 at 09:18
-
In that case, you could use **Virtual directory** to publish multiple projects. Detail you could refer to another [SO thread](https://stackoverflow.com/questions/43073570/create-virtual-directory-on-same-azure-web-app). – Tom Sun - MSFT Dec 06 '17 at 09:30