Using Polly for retry policy inside a DelegateHandler (in essence, re-running SendAsync with the same request a certain number of time), I started to have this exception popping up in Visual Studio.
Turns out that when debugging a netcoreapp2.0 project in VS, ApplicationInsights is automatically injected (see dotnet/aspnetcore#2051).
This exception is raised here: https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/develop/Src/DependencyCollector/Shared/Implementation/HttpCoreDiagnosticSourceListener.cs#L383 since the same request has been already sent in the same channel. There should be a check to update the content instead of a blind Add.
Using Polly for retry policy inside a
DelegateHandler(in essence, re-runningSendAsyncwith the same request a certain number of time), I started to have this exception popping up in Visual Studio.Turns out that when debugging a netcoreapp2.0 project in VS, ApplicationInsights is automatically injected (see dotnet/aspnetcore#2051).
This exception is raised here: https://github.com/Microsoft/ApplicationInsights-dotnet-server/blob/develop/Src/DependencyCollector/Shared/Implementation/HttpCoreDiagnosticSourceListener.cs#L383 since the same request has been already sent in the same channel. There should be a check to update the content instead of a blind Add.