Activities of "liangshiwei"

Hi,

I have answered you, please check it

Hi,

Does the problem still exist?

> public IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; }

Did you inject the IExceptionToErrorInfoConverter service in the constructor?

public IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; }

public MyClassName(IExceptionToErrorInfoConverter exceptionToErrorInfoConverter)
{
   ExceptionToErrorInfoConverter  = exceptionToErrorInfoConverter;
}

I also tried the following solution but I got: System.NullReferenceException: Object reference not set to an instance of an object

Can you share the error logs? thanks.

Hi,

Yes, you can configure it just like a normal entity, like we did:

https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRole.cs

https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs#L74-L88

Hi,

I think there is no problem.

Hi,

You can try to create a new project with the same name and use the winmerge to complete what's difference: https://docs.abp.io/en/abp/latest/Migration-Guides/Upgrading-Startup-Template

Hi,

Are you talking about the many-to-many join table?

ABP suite doesn't support adding fields to the join table.

Hi,

Sorry I didn't get it.

When you set Layout = null, the layout is now empty:

@{
   Layout = null;
}

BTW, we have a empty layout , you can use:

@inject IThemeManager ThemeManager
@{
    Layout = ThemeManager.CurrentTheme.GetEmptyLayout();
}

Hi,

Backend:

.....
app.UseAuthorization();

app.Use(async (httpContext, next) =>
{
    var currentUser = httpContext.RequestServices.GetRequiredService<ICurrentUser>();
    var currentPrincipal = httpContext.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>();
    var claimsIdentity = currentPrincipal.Principal.Identities.FirstOrDefault();
    
    if (currentUser.IsAuthenticated)
    {
        claimsIdentity?.AddClaim(new Claim("test","test"));
    }

    using (currentPrincipal.Change(claimsIdentity))
    {
        await next.Invoke();
    }
});

Blazor:

public class MyHubFilter : IHubFilter
{

    public virtual async ValueTask<object> InvokeMethodAsync(HubInvocationContext invocationContext,
        Func<HubInvocationContext, ValueTask<object>> next)

    {
        var currentUser = invocationContext.ServiceProvider.GetRequiredService<ICurrentUser>();

        if (!currentUser.IsAuthenticated)
        {
            return await next(invocationContext);
        }

        var currentPrincipalAccessor = invocationContext.ServiceProvider.GetRequiredService<ICurrentPrincipalAccessor>();

        var claimsIdentity = currentPrincipalAccessor.Principal.Identities.First();
        claimsIdentity.AddClaim(new Claim("test","test"));

        using (currentPrincipalAccessor.Change(claimsIdentity))
        {
            return await next(invocationContext);
        }

    }
}

Configure<HubOptions>(options =>
{
    options.AddFilter<MyHubFilter >();
});
Showing 4621 to 4630 of 6693 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 07, 2025, 08:20