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
open my project in visual studio
![](https://netkalon.com/wp-content/uploads/2019/01/image-13.png)
Right click on the project solution & select the Publish in this menu
![](https://netkalon.com/wp-content/uploads/2019/01/image-14.png)
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.
![](https://netkalon.com/wp-content/uploads/2019/01/image-15.png)
Figure 3
Set your App service name, Resource Group & Hosting Plan. Application Insights is recommended for production Build.
![](https://netkalon.com/wp-content/uploads/2019/01/image-16-533x400.png)
Figure 4
Already I have created a Database using SQL Server. So right now, skip creating a SQL Database method
![](https://netkalon.com/wp-content/uploads/2019/01/image-17.png)
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.
![](https://netkalon.com/wp-content/uploads/2019/01/image-18-580x400.png)
Figure 6
Oops, when I try to look my URL it is seems to show HTTP Error 500.0
![](https://netkalon.com/wp-content/uploads/2019/01/image-19.png)
If we clear the issue, need to add web.config file in this project.
![](https://netkalon.com/wp-content/uploads/2019/01/image-20.png)
Add the above XML code in web.config. Publish your app again
![](https://netkalon.com/wp-content/uploads/2019/01/image-21.png)
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.
![](https://netkalon.com/wp-content/uploads/2019/01/image-22.png)
Figure 10
We can monitor an App Service usage, request & response time
![](https://netkalon.com/wp-content/uploads/2019/01/image-24-560x400.png)
Figure 11