Activities of "liangshiwei"

Hi,

Can you share the full HTTP request and response?

HI,

Sorry my bad, please try:

var tokenHeaderName = abp.security.antiForgery.tokenHeaderName;
var token = abp.security.antiForgery.getToken();

new Dropzone('....',{  
    .......... 
    headers: {  
        tokenHeaderName : token
    } 
    .... 
}); 

Hi,

What happens when you use abp.security.antiForgery.tokenHeaderName and abp.security.antiForgery.getToken() in the browser's console tab?

Hi,

You can try sharing logs with google drive or one drive.

Hi,

I guess you need to add antiForgeryToken to the request header.

Try:

new Dropzone('....',{ 
    ..........
    headers: { 
        abp.security.antiForgery.tokenHeaderName: abp.security.antiForgery.getToken()
    }
    ....
});

Hi,

This is a problem with the template, we will fix it. ps: your ticket refunded

For now, you can try:

Add typeof(<YouProjectName>HttpApiModule) to <YouProjectName>WebModule and remove typeof(AbpHttpClientWebModule), it should be work.

Hi,

Can you share detail logs? (include identityServer and HttpApi.Host)

Hi,

You can use RabbitMQ only for background jobs, remove all AbpEventBusRabbitMqModule from your solution.then you can safely remove Rabbitmq's EventBus configuration.

Hi,

We will check it.

Hi,

Please try:

public static class RefreshRolesMiddlewareExtension
{
    public static IApplicationBuilder UseRefreshRolesMiddleware(this IApplicationBuilder app)
    {
        return app.Use(async (ctx, next) =>
        {
            var currentUser = ctx.RequestServices.GetRequiredService<ICurrentUser>();

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

            var userManager = ctx.RequestServices.GetRequiredService<IdentityUserManager>();

            var currentPrincipalAccessor = ctx.RequestServices.GetRequiredService<ICurrentPrincipalAccessor>();
            var user = await userManager.GetByIdAsync(currentUser.GetId());
            var roles= await userManager.GetRolesAsync(user);

            currentPrincipalAccessor.Principal.Identities.First().AddClaims(roles.Select(x=> new Claim(AbpClaimTypes.Role, x)));

            await next();

        });
    }
}
Showing 5361 to 5370 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 December 17, 2025, 07:08
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.