IHttpContextAccessor is no longer wired up by default, you have to register it yourself
services.TryAddSingleton<IHttpContextAccessor, HttpContextAccessor>();
More Related Contents:
- .NET Core dependency injection -> Get all implementations of an interface
- Windsor – pulling Transient objects from the container
- Logging, Aspect Oriented Programming, and Dependency Injection – Trying to make sense of it all
- How to specify the port an ASP.NET Core application is hosted on?
- Injecting data to a WCF service
- How do I effectively design my application where most classes depend on ILogger?
- ConfigureAwait(false) relevant in ASP.NET Core?
- Best way to use StructureMap to implement Strategy pattern
- Dependency Injection in .NET with examples?
- implement RSA in .NET core
- Dependency Injection and IDisposable
- VS 2015. Setting right target framework for ASP.NET 5 web project
- Which Dependency Injection Tool Should I Use? [closed]
- Why exactly isn’t MEF a DI/IoC container?
- Build .exe file in .NET Core RC2
- .Net Core MemoryCache PostEvictionCallback not working properly
- Is project.json deprecated?
- .net Core Quartz Dependency Injection
- How can a windows service programmatically restart itself?
- How to create/make rounded corner buttons in WPF?
- SQLite equivalent to ISNULL(), NVL(), IFNULL() or COALESCE()
- Parallelizing GDI+ Image Resizing .net
- FileUpload control inside an UpdatePanel without refreshing the whole page?
- How to use “contains” or “like” in a dynamic linq query?
- Unable to load DLL ‘SqlServerSpatial.dll’
- ResponseFormat.Json returns xml [duplicate]
- Register AspNetCore 2.1 Identity system with DbContext interface
- What’s the difference between SubscribeOn and ObserveOn
- Powershell Calling .NET Assembly that uses App.config
- WCF sessions with a wsHttpBinding and without windows security