You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use your library in my Blazor project server side.
With RenderMode.ServerPrerendered mode the Blazor will load 2 times, at the first time I can get the tenant name but at the second time the TenancyContext is null.
But when I switch to RenderMode.Server, it will load 1 time and the TenancyContext is always null.
Can you give me any suggestion to fix it?
Thanks.
The text was updated successfully, but these errors were encountered:
I resolve by adding ITenancyProvider into my constructor and getting tenant name from it. I check if the context is null I will get the tenant from TenancyProvider
if (tenancyContext.Tenant != null)
_tenancyContext = tenancyContext;
else
{
var task = Task.Run(async () => await tenancyProvider.GetCurrentTenantAsync());
_tenancyContext = new TenancyContext
{
Tenant = task.Result
};
}
Hello,
I use your library in my Blazor project server side.
With RenderMode.ServerPrerendered mode the Blazor will load 2 times, at the first time I can get the tenant name but at the second time the TenancyContext is null.
But when I switch to RenderMode.Server, it will load 1 time and the TenancyContext is always null.
Can you give me any suggestion to fix it?
Thanks.
The text was updated successfully, but these errors were encountered: