hi
The latest code of ValidateAsync method
public virtual async Task ValidateAsync(Tenant tenant)
{
Check.NotNullOrWhiteSpace(tenant.Name, nameof(tenant.Name));
Check.NotNullOrWhiteSpace(tenant.NormalizedName, nameof(tenant.NormalizedName));
var owner = await TenantRepository.FindByNameAsync(tenant.NormalizedName);
if (owner != null && owner.Id != tenant.Id)
{
throw new BusinessException("Volo.Saas:DuplicateTenantName").WithData("Name", tenant.NormalizedName);
}
}
Thanks @mattw 👍
The XXX.staticwebassets.endpoints.json of your project may break. Therefore, a rebuild will resolve the issue.
Great news 👍
That's the purpose of the LazyServiceProvider.
Yes, The UseMultiTenancy needs to be added after UseAuthentication
I will check and fix it in Studio.
Thanks.
That's strange.
Can you share a project to reproduce it? you can use new template project.
Thanks.
hi
Do you have app.UseMultiTenancy(); in your http://localhost/api/identity/users? module?
Thanks.
hi
Can you add new info to the logs?
var currentTenant = httpContext.RequestServices.GetRequiredService<ICurrentTenant>();
logger.LogError("Current TenantId:" + currentTenant.Id + ",name: " + currentTenant.Name );