However, my last two questions have nothing to do with the cache.
What can you say about that?
I have also identified a second problem. When I change the features of the assigned edition, the individual value of the tenant is deleted from the database and the value of the edition is applied.
It is very dangerous that settings are lost... is this the desired behavior?
Ok, thank you.
I now have the following problem:
Are no feature values of the edition applied as soon as a value is “overwritten” on the tenant?
I assumed that only this value (Identity.MaxUserCount) differs from the values of the edition?
So you don't know how long the entries in the cache are valid by default?
I don't want to implement a special function for this individual case. If I did, I would have to override the standard behavior so that the field is not deactivated in the features on the tenant.
Are there any other ways to force synchronization (e.g., restarting the app)? Or does this happen regularly in the background as a job?
Oh, I guess it has something to do with synchronization in the cache. When I checked again after a while, the value I had entered in the DB was there.
What is the default frequency for DB and cache synchronization? Can this be forced?
Hmm... but I tried to achieve this on a experimental way by creating a corresponding database entry in the AbpFeatureValues table for this tenant. That didn't work, and the old value was still displayed in the UI.
You can call the
await InvokeAsync(StateHasChanged)after changing theSelectedTenantId. Ensure the input has set the correct value.
The problem was that the DOM had not yet been updated at that moment. I solved it as follows:
<form method="post" action="Account/ImpersonateTenant" id="impersonateTenantForm">
<input type="hidden" name="TenantId" value="@SelectedTenantId" />
<input type="hidden" name="TenantUserName" value="admin" />
</form>
private Guid SelectedTenantId { get; set; }
private bool ShouldSubmitImpersonateTenantForm { get; set; } = false;
protected override async Task OnAfterRenderAsync(bool firstRender)
{
// Submit the impersonateTenantForm after setting the tenant ID
if (ShouldSubmitImpersonateTenantForm)
{
ShouldSubmitImpersonateTenantForm = false;
await JS.InvokeVoidAsync("submitForm", "impersonateTenantForm");
}
}
private async Task OnImpersonateTenantClick(Guid tenantId)
{
SelectedTenantId = tenantId;
ShouldSubmitImpersonateTenantForm = true;
await InvokeAsync(StateHasChanged);
}
function submitForm(formName) {
var form = document.getElementById(formName);
form.submit();
}
You can call the
await InvokeAsync(StateHasChanged)after changing theSelectedTenantId. Ensure the input has set the correct value.
I tried that too, but it didn't work. I thought it should work...
What can you tell me about the ReturnUrl?
I found another solution by creating a form around each button.
One more question: what is the purpose of the ReturnUrl? Is it to go to a specific page on the tenant or to return to a specific page when returning to the host?
Neither seems to work.