Learn Host ASP.NET Core – Web API (RESTful) in Azure App Service


In this blog, we will learn host asp.net core -web API in Azure app service


  • Visual Studio
  • Azure Account

In this demo, I have already created a project. see my previous blog links below

open my project in visual studio

Right click on the project solution & select the Publish in this menu

Now make sure your account login in visual studio. Pick a publish target will appear & currently select the App service tab. I am starting as create new then click Advanced label.it will be appearing one more popup of advanced setting. Once completed the settings click Save & Publish button.

Set your App service name, Resource Group & Hosting Plan. Application Insights is recommended for production Build.

Already I have created a Database using SQL Server. So right now, skip creating a SQL Database method

Figure 5

Once Click Create Button, it will start to deploy information view in output window. My app service completed successfully & you can able to see site URL info on above.

Figure 6

Oops, when I try to look my URL it is seems to show HTTP Error 500.0

Figure 7

If we clear the issue, need to add web.config file in this project.

Figure 8

Add the above XML code in web.config. Publish your app again

Figure 9

Now RESTful API web Service is ready to use & currently I am using Swagger UI in my project.

Let’s look App Service inside an azure portal.  

Figure 10

We can monitor a App Service usage, request & response time

Figure 11


Leave a reply