asp.net-corewebsocketblazorsignalrblazor-server-side

The circuit failed to initialize error once websocket is connected


I am trying to simply browse the home.razor page of my blazor app. It doesn't have any code in it except displaying the page title. The application is hosted on IIS with one more blazor app which works as expected. With this app, I am getting the below two errors:

The circuit failed to initialize. Invocation canceled due to the underlying connection being closed.

I see that before above two errors are seen there is a information message in the console saying websocket connected.

I am not getting any clue as to why the above two errors are seen.

Both the blazor apps run in their own application pools and are indifferent sub directories under the same IIS site.


Solution

  • I had to change the base url specified in App.razor file to all lowercase to get the error fixed. Also I noticed that the url's letter case should also be lower case else the error is seen again.

    <base href="/myapp/" />

    The post Blazor Server - the circuit failed to initialize helped me.