Repository navigation
Description
Server-configured browser options were introduced by #64807. These behaviors were found while reviewing dotnet/AspNetCore.Docs#38107. Reproduced with .NET SDK 11.0.100-rc.3.26522.148.
Circuit inactivity timeout
In a Blazor Web App with an Interactive Server component on /counter and a static page on /, configure:
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.WithBrowserOptions(options =>
options.StaticServer.CircuitInactivityTimeout = TimeSpan.FromMinutes(10));Open /counter, navigate to / using enhanced navigation, and watch the _blazor WebSocket in the browser's Network tab.
Expected: The circuit remains available for 10 minutes after its last interactive server root component is removed.
Actual: The connection closes after about two seconds. Returning to /counter creates a new circuit.
WebAssembly application culture
Create a Blazor Web App with WebAssembly interactivity named BrowserCultureRepro. Configure its endpoint in BrowserCultureRepro/Program.cs:
app.MapRazorComponents<App>()
.AddInteractiveWebAssemblyRenderMode()
.AddAdditionalAssemblies(typeof(BrowserCultureRepro.Client._Imports).Assembly)
.WithBrowserOptions(options =>
options.InteractiveWebAssembly.ApplicationCulture = "en-CA");Add BrowserCultureRepro.Client/Pages/Culture.razor:
@page "/culture"
@rendermode InteractiveWebAssembly
@using System.Globalization
<p>Running in browser: @OperatingSystem.IsBrowser()</p>
<p>Culture: @CultureInfo.CurrentCulture.Name</p>With the browser locale set to en-US, open /culture and wait for Running in browser: True.
Expected: Culture: en-CA.
Actual: Culture: en-US.
DOM preservation
In the Interactive Server app above, configure:
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.WithBrowserOptions(options => options.StaticServer.PreserveDom = false);Open /counter, then use the Home link to navigate to /.
Expected: DOM preservation is disabled and the browser performs a full page load.
Actual: Enhanced navigation still runs and the same document is preserved.
Interactive Server logging
In the same app, configure:
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.WithBrowserOptions(options => options.LogLevel = LogLevel.Trace);Open /counter, enable verbose messages in the browser console, and click the counter button.
Expected: Debug messages such as Dispatching event with handler id appear.
Actual: The circuit logger still uses the default warning level, so the debug message is missing.
Reconnection retry interval
In the same app, configure:
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.WithBrowserOptions(options =>
{
options.InteractiveServer.ReconnectionMaxRetries = 2;
options.InteractiveServer.ReconnectionRetryInterval = TimeSpan.FromMilliseconds(200);
});Open /counter, set the browser offline, and run Blazor._internal.forceCloseConnection() in the browser console. Watch the failed /_blazor/negotiate requests.
Expected: The two retry requests occur about 200 ms apart.
Actual: They occur about one second apart. The option reaches the browser; this is a reconnection timer behavior that predates #64807 and also affects the equivalent JavaScript option.
Activity
github-actions commentedon Nov 11, 2026
Triage Summary
Area:
area-blazor(StaticServer.CircuitInactivityTimeout/WithBrowserOptions, circuit disposal)Type:
Bug(configured timeout is ignored and the default is used)Potential Duplicates
Notes
src/Components/Endpoints/src/BrowserConfiguration/StaticServerBrowserOptions.csandsrc/Components/Endpoints/src/BrowserConfiguration/ConfigureBrowser.cs; existing tests insrc/Components/Endpoints/test/BrowserOptionsTest.cs.[-]CircuitInactivityTimeout set via WithBrowserOptions is ignored[/-][+]WithBrowserOptions ignores CircuitInactivityTimeout and ApplicationCulture[/+][-]WithBrowserOptions ignores CircuitInactivityTimeout and ApplicationCulture[/-][+]Blazor browser options are ignored or applied incorrectly[/+]oroztocil commentedon Nov 12, 2026
This aligns with findings from #68815