-
Notifications
You must be signed in to change notification settings - Fork 10.3k
How to retrieve the HttpContext from Blazor server-side ? #14090
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
Comments
Since Blazor server-side runs over SignalR, there is no HttpContext because HTTP is (usually) not involved. |
Closing this as per @MV10 's answer. |
Thanks @MV10 , I actually wanted to know how I can arrive at code like this: var cookies = Context.GetHttpContext().Request.Cookies; Context is ConnectionContext , I believe. What I looking for is a way to get client information such as IP address and browser name/version in Blazor server-side? Thanks... |
@enetstudio are you maybe thinking of this discussion? You said you saw something from @SteveSandersonMS about this, I happened across this recently while trying to discover whether the SignalR circuit info was exposed. Edit: Oops I guess Steve wasn't in that discussion... |
Thanks @MV10, I've seen the thread you linked to as well as this one: aspnet/SignalR#1114 As I've said above, I am looking for a way to get client information such as IP address and browser name/version in Blazor server-side... I want to do something like: |
Well, I knew that after reading an article by Steve Anderson, but seems to have forgotten that... Thanks in advance.
The text was updated successfully, but these errors were encountered: