Adding an asp.net MVC page along with Azure Mobile services

女生的网名这么多〃 提交于 2019-12-13 07:00:54

问题


I have backend(e.g. https://api.myapp.com) based on the Azure Mobile services(AMS), now I need 1. add one or two apis that doesn't require to be on AMS e.g. an heartbeat controller to check that service is online or not, that doesn't require Zumo Auth 2. an ASP.net MVC page(e.g. https://www.myapp.com) that explains about the application

Can I use the existing AMS to do this, I tried to add plain asp.net web api, but getting error that end point doesn't exist


回答1:


Are you truly using Azure Mobile Services and not Azure Mobile Apps? You generally cannot have a custom domain on Azure Mobile Services. Since you mention ZUMO Auth 2, I'm assuming you mean App Service Auth and thus Azure Mobile Apps.

I'd recommend taking a look at Azure Functions for any APIs that do not require ZUMO. However, you can just add a custom API to your service. I cover all the options for you in my book - http://aka.ms/zumobook - chapter 4.

As to a service controller for checking heartbeat. If the intent is to ensure that the service is alive, then just create an unauthenticated custom API that tests the database connectivity (maybe does an SQL command to get the count of rows in your main table) and returns success or failure. You can then use Azure Functions, Azure Scheduler or OMS to do a query of that custom API.



来源:https://stackoverflow.com/questions/42384948/adding-an-asp-net-mvc-page-along-with-azure-mobile-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!