-
Notifications
You must be signed in to change notification settings - Fork 25.2k
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
HttpContext/IHttpContextAccessor article #34592
base: main
Are you sure you want to change the base?
Conversation
ms.date: 01/30/2025 | ||
uid: signalr/httpcontext | ||
--- | ||
# `IHttpContextAccessor`/`HttpContext` in ASP.NET Core SignalR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For SignalR you should use Context.GetHttpContext()
when in the hub. See https://learn.microsoft.com/aspnet/core/signalr/hubs?view=aspnetcore-9.0#the-context-object for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @BrennanConroy ... See if my last commit places a good paragraph for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BrennanConroy ... pinging again in case you didn't see the earlier one.
Fixes #34587
Fixes #14974
NoTeS
Internal previews