static void ConfigureHubConnection( IHubConnectionBuilder hubConnectionBuilder, IServiceProvider serviceProvider) { var jsRuntime = serviceProvider.GetRequiredService <IJSRuntime>(); var navigationManager = serviceProvider.GetRequiredService <NavigationManager>(); hubConnectionBuilder.WithUrlBlazor(new Uri(DefaultHubUrl, UriKind.Relative), jsRuntime, navigationManager); }