In this article, I would explain how to how Webapi in Azure App Service. Lets add Swagger reference to API project using Nuget Package.
Build and run the API project and nagivate to Swagger index, this page consolidates the API operation and even provides an user interface to test it out
Take the swagger doc and save it as a JSON file. Which can be used later for importing these API operation in Azure APIM.
Lets now, create a Azure App Service from Azure Portal as shown, provide the APP Name and create/use existing resource group.
Once App Service is created, lets create a virtual directory for ProductAPI; under Application Setting.
Now get the publish profile and modify according to virtual directory and using this publish profile, we would deploy our code base to Azure App service.
Once the code is deployed successfully we access the api operation from Azure App Service.
Top comments (0)