Starts in:
1 DAY
22 HRS
47 MIN
40 SEC
Starts in:
1 D
22 H
47 M
40 S
Open Closed

Issue in Permssion From Web to Web.Public Project #2661


User avatar
0
kapil created
  • ABP Framework version: v4.4.4
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

i am using (IAuthorizationService instance) _authorizationService.IsGrantedAsync("Permission Name") in public project but when i am change the permission is not affected in Web.public Project.but when i restart project is affected.but i dont want to restart whole project.


4 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    The problem should be fixed in the new version, see: https://github.com/abpframework/abp/pull/11260

    If you don't want to upgrade your project, you can configure Redis in the Web.Public and Web projects.

    PS: you can create a new project to compare

  • User Avatar
    0
    kapil created

    how to config redis in project

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    you can create a new project to compare.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer
    [DependsOn(
        //.......
        typeof(AbpCachingStackExchangeRedisModule),
    
        )]
    public class ...PublicModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            .....
            
            Configure<AbpDistributedCacheOptions>(options =>
            {
                options.KeyPrefix = "YourProjectName:";
            });
            
            var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("YourProjectName");
            if (!hostingEnvironment.IsDevelopment())
            {
                var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
                dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "YourProjectName-Protection-Keys");
            }
        }
    }
    
    [DependsOn(
        //.......
        typeof(AbpCachingStackExchangeRedisModule),
    
        )]
    public class ...MvcModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            .....
            
            Configure<AbpDistributedCacheOptions>(options =>
            {
                options.KeyPrefix = "YourProjectName:";
            });
            
            var dataProtectionBuilder = context.Services.AddDataProtection().SetApplicationName("YourProjectName");
            if (!hostingEnvironment.IsDevelopment())
            {
                var redis = ConnectionMultiplexer.Connect(configuration["Redis:Configuration"]);
                dataProtectionBuilder.PersistKeysToStackExchangeRedis(redis, "YourProjectName-Protection-Keys");
            }
        }
    }
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06