Skip to content

[Blazor] Provide access to the underlying SignalR HttpConnectionDispatcherOptions in AddInteractiveServerRenderMode #63520

@javiercn

Description

@javiercn

This was possible with MapBlazorHub, but it doesn't seem possible with AddInteractiveServerRenderMode.

Calling MapBlazorHub won't work since that will try to register another endpoint.

Right now, this is the best way to do it:

    .Add(e =>
    {
        var metadata = e.Metadata;
        var dispatcherOptions = metadata.OfType<HttpConnectionDispatcherOptions>().FirstOrDefault();
        if (dispatcherOptions != null)
        {
            dispatcherOptions.CloseOnAuthenticationExpiration = true;
        }
    });

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions