Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

System.NullReferenceException in WebSessionTelemetryInitializer #903

Closed
Dmitry-Matveev opened this issue Jun 13, 2019 · 3 comments
Closed
Assignees
Milestone

Comments

@Dmitry-Matveev
Copy link
Member

The following exception happens often in .NET Core SDK as per our telemetry.
Reported by .NET SDK 2.9.1 mapping to ASP.NET Core SDK 2.6.

AI (Internal): [Microsoft-ApplicationInsights-Core] [msg=Log Error];
[msg=Exception while initializing Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer, exception message - System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest.get_Cookies()
at Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer.UpdateRequestTelemetryFromPlatformContext(RequestTelemetry requestTelemetry, HttpContext platformContext)
at Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.WebSessionTelemetryInitializer.OnInitializeTelemetry(HttpContext platformContext, RequestTelemetry requestTelemetry, ITelemetry telemetry)
at Microsoft.ApplicationInsights.AspNetCore.TelemetryInitializers.TelemetryInitializerBase.Initialize(ITelemetry telemetry)
at Microsoft.ApplicationInsights.TelemetryClient.Initialize(ITelemetry telemetry)]
@jorismathijssen
Copy link

Currently experiencing the exact same problem.

@cijothomas cijothomas added this to the 2.8.0 milestone Jul 9, 2019
@cijothomas
Copy link
Contributor

will address for next stable.

@cijothomas
Copy link
Contributor

This was reported in 2017 version of sdk onwards. so this shoud be addressed sooner.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants