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

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
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

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

Prerequisite:

  • Visual Studio
  • Azure Account

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

https://blog.netkalon.com/blog/learn-asp-net-core-mvc-with-mssql-using-dapper-orm-restful/

open my project in visual studio

Figure 1

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


Figure 2

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.


Figure 3

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


Figure 4

Already I have created Database using SQL Server. So right now, skip to create 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

Thiruppathi Rengasamy
I'm a Dotnet Developer & Blogger. And also I'm working as a senior software engineer. I would like to spend my precious time writing articles, research on .Net technologies, and to learn new technologies.