Fixing a lack of security monitoring
Monitoring allows us to actively observe events that occur in our ASP.NET Core web applications. Missing out on incidents as they happen in real time can lead to an attacker causing more damage as each minute goes by. Developers must enable monitoring in their ASP.NET Core web applications to have early preventive detection.
In this recipe, we will fix a lack of security monitoring in our sample Online Banking web app by implementing Azure Application Insights.
How to do it…
Let's take a look at the steps for this recipe:
- From the starting exercise folder, launch VS Code by typing the following command:
code .
- Navigate to Terminal | New Terminal in the menu or do this by simply pressing Ctrl + Shift + ' in VS Code.
- Install the Application Insights software development kit (SDK) by running the following command in the VS Code terminal:
dotnet add package Microsoft.ApplicationInsights.AspNetCore
- Open
Startup...