How to Create a Web API App using ASP.NET Core with App Insights

1 Comment

In this post, we will look at how to create an ASP.NET Core Web Application and host it in Azure with Application Insights.

First, let’s open Visual Studio and create a new ASP.NET Core Web Application project:

Give the project a name:

And select API as the type:

We see the project in VS below:

Press F5 to run the app. Click Yes if you see the message below:

And click Yes to the security warning:

A browser will open and you will see the API values:

Now let’s deploy this API to Azure.Right-click the project and select Publish:

Create a new App Service:

Confirm the information and select an Application Insights region:

The app will be published, with the URL displayed:

Go to the URL to api/values. We see the app is now running in the cloud:

Now log into https://portal.azure.com and go to the app that was created:

Click on Application Insights:

You will see requests being logged:

Which you can drill into to get more specific metrics:

 

THANKS FOR READING. BEFORE YOU LEAVE, I NEED YOUR HELP.
 

I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.

IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.

THANK YOU, AND LET'S KEEP LEARNING TOGETHER.

CARL

https://www.youtube.com/carldesouza

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

One Response to How to Create a Web API App using ASP.NET Core with App Insights

  1. Good post. Carl. The post offers good information about creating an ASP.NET Core application and hosting it in Azure. The process of creating the web app is nicely explained. The information in the post is useful and it is easy to understand the procedure. Thanks for sharing this information.

Leave a Reply

Your email address will not be published. Required fields are marked *