Neil Fenwick
neil-fenwick.bsky.social
Neil Fenwick
@neil-fenwick.bsky.social
Software engineer, tech enthusiast, gamer, geek. Works with .NET & C#, loves Go. Also likes to run, a lot.
Reposted by Neil Fenwick
December 27, 2024 at 3:12 PM
Reposted by Neil Fenwick
December 27, 2024 at 12:42 PM
Reposted by Neil Fenwick
Ran into this issue today - DelegatingHandlers in #dotnet use a different scope than the request in which they are running. You can get around it by using IHttpContextAccessor as @andrewlock.bsky.social shows here:
andrewlock.net/understandin...

This needs to be better documented.
DI scopes in IHttpClientFactory message handlers don't work like you think they do
In this post I discuss how handler DI scopes work in IHttpClientFactory, and how they're different to the request DI scope.
andrewlock.net
December 18, 2024 at 5:13 PM