New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The IHttpContextAccessor service is not registered by default #190

Open
Tratcher opened this Issue Jun 8, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@Tratcher
Member

Tratcher commented Jun 8, 2016

IHttpContextAccessor can be used to access the HttpContext for the current thread. However, maintaining this state has non-trivial performance costs so it has been removed from the default set of services.

Developers that depend on it can add it back as needed:
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();

See aspnet/Hosting#793 for discussion.

@Tratcher Tratcher added this to the 1.0.0-rc2 milestone Jun 8, 2016

@aspnet aspnet locked and limited conversation to collaborators Jun 8, 2016

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