Errors with two Blazor hubs in IISExpress

229 Views Asked by At

I have two blazor applications running in IIS Express. Both using https, localhost and unique port numbers.

When I have either application running in isolation they function correctly. However when I have both applications running I get intermittent but regular unhandled exceptions on both. These errors can happen when I navigate inside the application or refresh.

On the screen I see;

An unhandled exception has occurred. See browser dev tools for details. Reload X

and in the console I get;

Error: The list of component records is not valid.

I copied a lot of settings across when creating the 2nd application and both applications are hooked up to Azure SignalR Application Insights.

In the startup file I have:

    app.UseEndpoints(endpoints =>
    {
        endpoints.MapBlazorHub();
        endpoints.MapFallbackToPage("/_Host");
    });

Is there another unique Blazor hub name or something that I need to be aware of?

1

There are 1 best solutions below

0
On

When I publish these applications to local IIS (not IISExpress) they can both run at the same time without seeing these persistent problems.

So the part of the cause is IIS Express.