This blog will show you how you can host a RESTful ASP.NET Core Web API in an Azure App Service.
Right-click on the project solution and select "Publish" from the opened menu.
Now, make sure your account is logged-in in Visual Studio. The "Pick a publish target" blade will appear; select the "App Service" tab.
I am starting it so I have selected "Create New" radio button. Now, let us click the "Advanced" label.
It will pop one more window for the advanced settings. Once you've selected the desired settings, click the "Save and Publish" button.
Set your App Service name, Resource Group, and Hosting Plan. Application Insights is recommended for production build.
I have already created a database using SQL Server. So, right now, skip creating a SQL Database method.
Once the "Create" button is clicked, it will start to deploy the information view in the output window. My app service has completed successfully. You can see the site URL info on the above.
Oops! When I try to look onto my URL, it seems to show HTTP Error 500.0.
To clear the issue, we need to add the web.config file to this project.
Add the above XML code in web.config and publish your app again.
Now, the RESTful API Web Service is ready to use. Currently, I am using SwaggerUI in my project.
Let’s look at the App Service inside an Azure portal.
We can monitor the App Service usage, request, and response time.