Hi there.
Yes it's still an issue.
Here is the video
https://drive.google.com/file/d/1b7krwYqcBSHcI_ZZumGrWN6hIRk9Evb1/view?usp=drive_link
On the Tenants page
Steps: Navigate to the Tenants page Click on the New tenant button The form does not open when users click on the button once - they have to click on it again
Once the form opens, users see that the "Tenant admin's email address" and "Tenant admin's password" show error messages by default
Users see that the error message is no longer visible
The issue occurs again (happens when users load the Tenants page - only the 1st time)
Attached is the video for reference
ABP 9.2.2 with Blazor Web App
We are getting random exceptions System.ObjectDisposedException when the system is under load.
Autofac.Core.Lifetime.LifetimeScope.ThrowDisposedException()
Blazorise.ComponentActivator.CreateInstance(System.Type)
Microsoft.AspNetCore.Components.RenderTree.Renderer.InstantiateChildComponentOnFrame(Microsoft.AspNetCore.Components.RenderTree.RenderTreeFrame[], Int32, Int32)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InitializeNewSubtree(DiffContext ByRef, Int32)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.InsertNewFrame(DiffContext ByRef, Int32)
Microsoft.AspNetCore.Components.RenderTree.RenderTreeDiffBuilder.AppendDiffEntriesForRange(DiffContext ByRef, Int32, Int32, Int32, Int32)
Microsoft.AspNetCore.Components.Rendering.ComponentState.RenderIntoBatch(Microsoft.AspNetCore.Components.Rendering.RenderBatchBuilder, Microsoft.AspNetCore.Components.RenderFragment, System.Exception ByRef)
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
Microsoft.AspNetCore.Components.HtmlRendering.Infrastructure.StaticHtmlRenderer.HandleException(System.Exception)
Microsoft.AspNetCore.Components.RenderTree.Renderer.ProcessRenderQueue()
Microsoft.AspNetCore.Components.ComponentBase.StateHasChanged()
Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext.<InvokeAsync>g__Execute|8_0(System.ValueTuple`3<System.Runtime.CompilerServices.AsyncTaskMethodBuilder,System.Action,Microsoft.AspNetCore.Components.Rendering.RendererSynchronizationContext>)
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task, System.Threading.Tasks.ConfigureAwaitOptions)
Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.Common.ContentToolbar+<<OnInitializedAsync>b__7_1>d.MoveNext()
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Threading.Tasks.Task+<>c.<ThrowAsync>b__128_1(System.Object)
System.Threading.QueueUserWorkItemCallback.Execute()
System.Threading.ThreadPoolWorkQueue.Dispatch()
System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
InlinedCallFrame
InlinedCallFrame
System.Runtime.EH.DispatchEx(System.Runtime.StackFrameIterator ByRef, ExInfo ByRef)
System.Runtime.EH.RhThrowEx(System.Object, ExInfo ByRef)
HelperMethodFrame
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
System.Threading.Tasks.Task+<>c.<ThrowAsync>b__128_1(System.Object)
System.Threading.QueueUserWorkItemCallback.Execute()
System.Threading.ThreadPoolWorkQueue.Dispatch()
System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
DebuggerU2MCatchHandlerFrame
KERNELBASE!RaiseException+0x6c coreclr!SfiNext+0xea0fe coreclr!InlinedCallFrame::`vftable'
I tried the suggested css but it looks like those classes aren't on blazor. I'm guessing it has to be set on the components or something.
I'll wait for a fix.
Sorry forgot to mention. Blazor Web App.
I'm trying the CSS suggested by the bot now.
Is there a way to override consts without downloading the entire project?
If not can we override the logger to trim anything beyond 30 chars so it'll save properly?
Would like to avoid adding the entire project if we can.
We're getting this exception:
An error occurred while saving the entity changes. See the inner exception for details. String or binary data would be truncated in table 'SafetyPlusWeb.dbo.AbpSessions', column 'IpAddresses'. Truncated value: '10.1.0.23,10.1.1.7,10.1.1.14,10.1.1.15,10.1.0.18,10.1.0.32,10.1.0.4,10.1.1.12,10.1.1.10,10.1.0.25,10'.
How can we increase the size of IpAddresses field on the AbpSessions table?
We need to implement Oauth segregated by Tenant.
I looked into using https://abp.io/modules/Volo.OpenIddict.Pro but it does not seem to support this.
I found a partial solution in this question but it's missing a lot of details. https://abp.io/support/questions/4404/How-to-enable-Openiddict-for-multitenant
Can you provide some guidance on how to accomplish this?
Thanks so much.
To help anyone else looking. I wanted to share how we fixed the normalized name for multi-tenant subdomain.
Please refund the ticket :)
using System.Text.RegularExpressions;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace MyProject.Blazor.Services
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(ITenantNormalizer))]
public class CustomUpperInvariantTenantNormalizer : ITenantNormalizer, ITransientDependency
{
public virtual string? NormalizeName(string? name)
{
if (string.IsNullOrEmpty(name))
{
return name;
}
// Normalize, convert to lower case, replace spaces and special characters with hyphens
string subdomain = name.Normalize()
.ToLowerInvariant()
.Replace(" ", "-")
.Replace("_", "-");
// Remove any characters that are not letters, numbers, or hyphens
subdomain = Regex.Replace(subdomain, @"[^a-z0-9-]", "");
// Ensure the subdomain does not start or end with a hyphen
subdomain = subdomain.Trim('-');
return subdomain;
}
}
}
-- Update NormalizedName field on Existing Tenants
DROP TABLE IF EXISTS #TenantsNormalizedNames;
CREATE TABLE #TenantsNormalizedNames
(
Id UNIQUEIDENTIFIER NOT NULL,
NormalizedName NVARCHAR(255) NULL
);
INSERT INTO #TenantsNormalizedNames
(Id, NormalizedName)
SELECT Id,
UPPER(
TRIM('-' FROM
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
REPLACE(
NormalizedName, ' ', '-'
), '_', '-'
), '.', '-'
), '!', ''
), '@', ''
), '#', ''
), '$', ''
), '%', ''
), '&', ''
), '*', ''
), '(', ''
), ')', ''
), '''', '' -- Handling the single quote
)
)
) AS NormalizedName
FROM
[dbo].[SaasTenants];
SELECT t.NormalizedName, s.NormalizedName
FROM
[dbo].[SaasTenants] t
JOIN #TenantsNormalizedNames s
ON t.Id = s.Id
WHERE
t.NormalizedName <> s.NormalizedName;
UPDATE t
SET t.NormalizedName = s.NormalizedName
FROM
[dbo].[SaasTenants] t
JOIN #TenantsNormalizedNames s
ON t.Id = s.Id
WHERE
t.NormalizedName <> s.NormalizedName;
SELECT Name, NormalizedName
FROM
[dbo].[SaasTenants]