diff --git a/aspnetcore/blazor/fundamentals/signalr.md b/aspnetcore/blazor/fundamentals/signalr.md index e9a9e5349a67..04d41fd265a0 100644 --- a/aspnetcore/blazor/fundamentals/signalr.md +++ b/aspnetcore/blazor/fundamentals/signalr.md @@ -1452,6 +1452,61 @@ Use a to c :::moniker-end +## Start the SignalR circuit at a different URL + +Prevent automatically starting the app by adding `autostart="false"` to the Blazor ` ++ ++ +``` + +Blazor Server: + +:::moniker-end + +```diff +- ++ ++ +``` + +Add the following call with the hub path to the middleware processing pipeline in the server app's `Program` file. + +:::moniker range=">= aspnetcore-8.0" + +Blazor Web Apps: + +```csharp +app.MapBlazorHub("/signalr"); +``` + +Blazor Server: + +:::moniker-end + +Leave the existing call to in the file and add a new call to with the path: + +```diff +app.MapBlazorHub(); ++ app.MapBlazorHub("/signalr"); +``` + ## `IHttpContextAccessor`/`HttpContext` [!INCLUDE[](~/blazor/security/includes/httpcontext.md)]