I implemented my webapp so that it is able to log data to Application Insights through managed identity. I noticed now that after my implementation I am getting an error on the home page of the webapp:
This is the page that comes up on my app when loads up when a valid route is not found. If I was to go to the Console this is what I see:
Like I mentioned, this came after Managed Identity was implemented.
Thanks @Panagiotis Kanavos for the comments.
Yes, .NET Core 3.1 is OutofSupport and your App may not work as expected.
If you still want to continue with the old Core 3.1 version, check the below steps.
Thanks @Stefano Demiliani for the clear explanation.
I have taken references from MSDoc and demiliani
Monitoring Metrics Publisher
in Application Insights.Even the Properties section in Application Insights says the same.
Disable the Local Authentication.
My .csproj
file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<ApplicationInsightsResourceId>/subscriptions/**********/resourceGroups/********/providers/microsoft.insights/components/Core3AppInsights</ApplicationInsightsResourceId>
<UserSecretsId>********</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.21.0" />
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
</ItemGroup>
</Project>
In Startup.cs file, add under ConfigureServices,services.AddApplicationInsightsTelemetry();
.