Question

I have a Web API running locally in a DEV environment that I would like to deploy to Azure and I'm trying to figure out if I should deploy it as an Azure Website or if I should use Azure Mobile Services now that .Net/Web API is supported.

I don't want to re-write the API - it is almost fully implemented and relies on custom models, DTOs and business logic. It is not a RESTful API and it uses custom API methods for sync and other functionality - in other words, not a CRUD API. It is my understanding that this should all work under the latest version of Azure Mobiles Services, but I am not certain.

I'm considering this approach over Azure Websites in order to take advantage of the built-in authentication support and to have one less piece to worry about managing. However, with the .Net support in Azure Mobile Services being fairly new, I am having a hard time finding good information on how to go about taking my existing API and integrating it into Mobile Services.

I also want to be sure that I can develop, run and debug this application locally without any connection to Azure. Again, I believe this is possible but I would like some confirmation.

Two questions:

  1. How can I take an existing Web API and integrate it into Azure Mobile Services without major modifications or should I just use Azure Websites?
  2. Can Azure Mobile Services applications run in a local development environment with no connection to Azure online?
Was it helpful?

Solution

To answer your queries..

  1. Converting your existing web api to azure mobile services

Have a look at this blog.. http://blogs.msdn.com/b/azuremobile/archive/2014/04/10/creating-an-azure-mobile-services-net-backend-from-scratch.aspx

It talks about developing azure mobile service from scratch. It has the required bits you need to modify your existing web api project to a mobile service.

2, Yes, this is possible..

See this blog I wrote http://www.supreet-tare.com/2014/04/create-multi-table-dot-net-backend_24.html

Or see this one that details how to configure mobile service web api project to run locally

https://github.com/WindowsAzure/azure-content/blob/master/includes/mobile-services-how-to-configure-iis-express.md

Hope this helps. Supreet

OTHER TIPS

Ok, so you have an existing WebAPI that you've developed, and it works fine. Further, you also have an existing hosting option within Azure, namely Azure Websites.

Given this, what is the reason to want to host it as an Azure Mobile Service? Do you gain any additional benefit in doing so?

If not, then just host it under an Azure Website and job is done.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top