Open paburgos opened 2 years ago
hi @paburgos I'm not a Blazor expert but I suspect this has to do with how Blazor handles scoped DI. Here is how the services are registered for Finbuckle.MultiTenant.
I'm going to take a closer look and try to figure out what's happening -- do you have a repo with the issue you can share with me?
Hi @AndrewTriesToCode
I just uploaded this repo: https://github.com/paburgos/SignalRFinbuckleIssue
it should work as is, and show you "My Tenant Name" from Index
To reproduce the error, you can uncomment all sections related to SignalR: https://github.com/paburgos/Issues/blob/main/SignalRFinbuckleIssue/appsettings.json https://github.com/paburgos/Issues/blob/main/SignalRFinbuckleIssue/Properties/launchSettings.json
And enable, this //builder.Services.AddSignalR().AddAzureSignalR(); in https://github.com/paburgos/Issues/blob/main/SignalRFinbuckleIssue/Program.cs
Hope this helps, and thank you for taking the time and the prompt response!
Hi,
When using Blazor Server Side and configuring the Azure SignalR Service looks like services.AddMultiTenant conflicts with it.
To enable Azure SignalR is simple:
install the nuget package. Then addig this to startup.cs:
services.AddSignalR().AddAzureSignalR();
In launchSettings.json adding this variable:
"ASPNETCORE_HOSTINGSTARTUPASSEMBLIES": "Microsoft.Azure.SignalR
Then it just matters to add SignalR connection string in the appsettings.
This is how the TenantInfo is registered:
services.AddMultiTenant<MyTenantInfo>().WithConfigurationStore().WithHostStrategy();
The error I am getting is:
As soon as I remove all SignalR references, MultiTenant works back again.
What I might be doing wrong?