Skip to content

Regarding Blazor and IHttpContextAccessor #25755

Discussion options

You must be logged in to vote

Does anyone know what the real caveats and risks are when using IHttpContextAccessor in Blazor Server?

I think you can't count on IHttpContextAccessor returning anything. Our recommended deployment environment for Blazor Server is using the Azure SignalR service (see: Deploying Blazor Server), and in this case, there won't be any HttpContext associated with the connections.

@javiercn Do you have anything to add to this?

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@javiercn
Comment options

@NiTi80
Comment options

@javiercn
Comment options

@NiTi80
Comment options

Answer selected by NiTi80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants