ASP.NET Web API is a platform supporting development of RESTful applications for clients including web and mobile, built on the .NET framework. As Web APIs are RESTful they can be configured to use standard HTTP requests (GET, PUT, POST, DELETE) to perform corresponding database CRUD actions.
Custom Web APIs can be created in Visual Studio using Microsoft Visual Basic (VB) or C# by selecting the ASP.NET template then the Web API template. If you chose to ‘Host in the cloud’ for Microsoft Azure you can choose a VM (running IIS) or Azure Web App.
Azure Web Apps can scale out (Free, Shared, Basic, Standard, Premium) and scale up (F1, D1, B1-B3, S1-S3, P1-P4). The Basic service allows manual scaling, the Standard and Premium service enables auto scaling. Basic and Standard both support instances (scaling up) with 7GB RAM and 4 CPU Cores, Premium supports up to 14GB RAM and 8 CPU Cores.
Azure WebJobs handle long-running jobs as executables and scripts:
- .cmd, .bat, .exe (Windows cmd)
- .ps1 (Windows PowerShell)
- .php (PHP)
- .sh (Bash)
- .js (Node)
- .py (Python)
WebJobs can be run continuously, on demand or on a schedule. By default continuous jobs run on all instances but can be configured to run on a single instance. When deciding to scale up or scale out this needs to be considered in regards to whether the job will support running across multiple instances.
Several authentication solutions can be used for securing a Web API:
- Azure AD – stand-alone or synchronised with on-premise AD
- AD FS – request identity from on-premise AD
- ACS – can use multiple identity services