© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
35 replies
velreine

❔ Unable to resolve service for type 'Microsoft.AspNetCore.Http.IHttpContextAccessor'

I'm having this exception thrown at run-time even though
builder.Services.AddHttpContextAccessor()
builder.Services.AddHttpContextAccessor()
was invoked, anyone who knows what might be at fault here?

LMK if more details are needed.
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ Unable to resolve service type for IHttpClientFactory
C#CC# / help
3y ago
✅ Unable to create migration - 'Unable to resolve service for type 'DbContextOptions'
C#CC# / help
2y ago
❔ Webhook Package for Microsoft.AspNetCore?
C#CC# / help
3y ago