How to enable skipNegotiation setting in Blazor Server for avoid sticky sessions
In documentation https://learn.microsoft.com/ru-ru/aspnet/core/signalr/scale?view=aspnetcore-5.0
When all clients are configured to only use WebSockets, and the SkipNegotiation setting is enabled in the client configuration
In _Host.cshtml
<script src="_framework/blazor.server.js" autostart="false"></script>
<script>
Blazor.start({
configureSignalR: function (builder) {
builder.withUrl("/_blazor", {
skipNegotiation: true,
transport: 1
});
}
});
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With