Skip to content

Instantly share code, notes, and snippets.

@SQL-MisterMagoo
Created June 17, 2021 09:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SQL-MisterMagoo/9cb2e4b14c46aa2326c8e8b6a59a5112 to your computer and use it in GitHub Desktop.
Save SQL-MisterMagoo/9cb2e4b14c46aa2326c8e8b6a59a5112 to your computer and use it in GitHub Desktop.
Example Blazor Server SignalR config for a busy VPN network
//this is how the default project looks like:
services.AddServerSideBlazor();
//this is how it looks now:
services.AddServerSideBlazor(options =>
{
options.DetailedErrors = false;
options.DisconnectedCircuitMaxRetained = 100;
options.DisconnectedCircuitRetentionPeriod = TimeSpan.FromMinutes(3);
options.JSInteropDefaultCallTimeout = TimeSpan.FromMinutes(1);
options.MaxBufferedUnacknowledgedRenderBatches = 10;
})
.AddHubOptions(options =>
{
options.ClientTimeoutInterval = TimeSpan.FromSeconds(30);
options.EnableDetailedErrors = false;
options.HandshakeTimeout = TimeSpan.FromSeconds(15);
options.KeepAliveInterval = TimeSpan.FromSeconds(15);
options.MaximumReceiveMessageSize = 32 * 1024;
options.StreamBufferCapacity = 10;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment