As far as I can tell, the issue is not with Blazor Server itself, but with how the route parameter is defined and bound. In Blazor, route templates should be enclosed in quotes, and the route parameter must match a [Parameter] property on the component with a compatible type. If either of these is wrong, Blazor throws a routing exception, which breaks the server circuit and causes the UI to stop responding.
Your directive is missing quotes, so the route constraint is not parsed correctly. It should be written as a string literal.
@page "/mypage/{thestate:bool?}"
In addition, the component must declare a matching parameter. Because the route allows the value to be optional (bool?), the property must also be nullable.
@code {
[Parameter]
public bool? thestate { get; set; }
}
With this setup:
/mypage → thestate == null
/mypage/true → thestate == true
/mypage/false → thestate == false
If the parameter type is non-nullable (bool) while the route allows it to be optional, or if the route syntax is invalid, Blazor throws an exception during routing. In Blazor Server, any unhandled exception during rendering terminates the circuit, which is why user interactions stop working afterward.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin