Activities of "cetin.sahin"

  • ABP Framework version: v9.0.4
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

When we call our abp.io blazor server project in an html page or an Azure power apps page, we get an ERR_BLOCKED_BY_RESPONSE error. How can we fix this problem?

  • ABP Framework version: v8.3.1
  • UI Type:/ Blazor Server
  • Database System: EF Core (SQL Server,
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/
  • Exception message and full stack trace:
  • Steps to reproduce the issue: we can't create solution int abp suite 8.3.1
  • ABP Framework version: v8.3.1
  • UI Type:Blazor Server
  • Database System: EF Core (SQL Server,
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

we overrided IPermissionStore in Application project . but after login IPermissionStore dont working Our code:

using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Logging; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Volo.Abp; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Caching; using Volo.Abp.DependencyInjection; using Volo.Abp.PermissionManagement; using EnzimWeb.Helpers; using Volo.Abp.Identity; using Volo.Abp.Users; using Volo.Abp.Data; using System.Reflection; using IdentityModel; using System.Security.Claims; using Veri.Temel; using System; using Veri.Temel.Sabitler; using EnzimWeb.Permissions; using EnzimWeb.CrmKurums; using EnzimWeb.Rols; using Microsoft.Extensions.Configuration;

namespace EnzimWeb.Overrides { [Dependency(ReplaceServices = true)] [ExposeServices(typeof(IPermissionStore))] public class MyPermissionStore : IPermissionStore, ITransientDependency { public ILogger<PermissionStore> Logger { get; set; }

    protected  IPermissionGrantRepository PermissionGrantRepository { get; }

    protected  IPermissionDefinitionManager PermissionDefinitionManager { get; }

    protected IDistributedCache&lt;PermissionGrantCacheItem&gt; Cache { get; }
    protected IRoleHelperRepository _roleHelperRepository { get; }
    protected IdentityUserManager _identityUserManager { get; }
    protected ICurrentUser _currentUser { get; }
    protected IIdentityRoleRepository _roleRepository;
    private readonly IConfiguration _configuration;
    public MyPermissionStore(
    IPermissionGrantRepository permissionGrantRepository,
    IDistributedCache&lt;PermissionGrantCacheItem&gt; cache,
    IPermissionDefinitionManager permissionDefinitionManager,
    IRoleHelperRepository roleHelperRepository,
    IdentityUserManager userManager,
    ICurrentUser currentUser,
    IIdentityRoleRepository roleRepository,
    IConfiguration configuration)
    {
        PermissionGrantRepository = permissionGrantRepository;
        Cache = cache;
        PermissionDefinitionManager = permissionDefinitionManager;
        Logger = NullLogger&lt;PermissionStore&gt;.Instance;
        _roleHelperRepository = roleHelperRepository;
        _identityUserManager = userManager;
        _currentUser = currentUser;
        _roleRepository = roleRepository;
        _configuration = configuration;
    }




    public virtual async Task&lt;bool&gt; IsGrantedAsync(string name, string providerName, string providerKey)
    {
        return (await GetCacheItemAsync(name, providerName, providerKey)).IsGranted;
    }

    protected virtual async Task&lt;PermissionGrantCacheItem&gt; GetCacheItemAsync(
    string name,
    string providerName,
    string providerKey)
    {
       
        var cacheKey = CalculateCacheKey(name, providerName, providerKey);

        Logger.LogInformation($"PermissionStore.GetCacheItemAsync: {cacheKey}");

        var cacheItem = await Cache.GetAsync(cacheKey);

        if (cacheItem != null)
        {
            Logger.LogInformation($"Found in the cache: {cacheKey}");
            return cacheItem;
        }

        Logger.LogInformation($"Not found in the cache: {cacheKey}");

        cacheItem = new PermissionGrantCacheItem(false);

        await SetCacheItemsAsync(providerName, providerKey, name, cacheItem);

        return cacheItem;
    }

    protected virtual async Task SetCacheItemsAsync(
    string providerName,
    string providerKey,
    string currentName,
    PermissionGrantCacheItem currentCacheItem)
    {
        var permissions = await PermissionDefinitionManager.GetPermissionsAsync();

        Logger.LogInformation($"Getting all granted permissions from the repository for this provider name,key: {providerName},{providerKey}");

        var grantedPermissionsHashSet = new HashSet&lt;string&gt;(
        (await PermissionGrantRepository.GetListAsync(providerName, providerKey)).Select(p => p.Name)
        );
        foreach (var item in await GetEnzimPermissions(providerName, providerKey))
        {
            grantedPermissionsHashSet.AddIfNotContains(item);
        }
        Logger.LogInformation($"Setting the cache items. Count: {permissions.Count}");

        var cacheItems = new List&lt;KeyValuePair&lt;string, PermissionGrantCacheItem&gt;>();

        foreach (var permission in permissions)
        {
            var isGranted = grantedPermissionsHashSet.Contains(permission.Name);

            cacheItems.Add(new KeyValuePair&lt;string, PermissionGrantCacheItem&gt;(
            CalculateCacheKey(permission.Name, providerName, providerKey),
            new PermissionGrantCacheItem(isGranted))
            );

            if (permission.Name == currentName)
            {
                currentCacheItem.IsGranted = isGranted;
            }
        }
        await Cache.SetManyAsync(cacheItems);

        Logger.LogInformation($"Finished setting the cache items. Count: {permissions.Count}");
    }
    public virtual async Task&lt;MultiplePermissionGrantResult&gt; IsGrantedAsync(string[] names, string providerName, string providerKey)
    {
        Check.NotNullOrEmpty(names, nameof(names));

        var result = new MultiplePermissionGrantResult();

        if (names.Length == 1)
        {
            var name = names.First();
            result.Result.Add(name,
            await IsGrantedAsync(names.First(), providerName, providerKey)
            ? PermissionGrantResult.Granted
            : PermissionGrantResult.Undefined);
            return result;
        }

        var cacheItems = await GetCacheItemsAsync(names, providerName, providerKey);
        foreach (var item in cacheItems)
        {
            result.Result.Add(GetPermissionNameFormCacheKeyOrNull(item.Key),
            item.Value != null && item.Value.IsGranted
            ? PermissionGrantResult.Granted
            : PermissionGrantResult.Undefined);
        }

        return result;
    }

    protected virtual async Task&lt;List&lt;KeyValuePair&lt;string, PermissionGrantCacheItem&gt;>> GetCacheItemsAsync(
    string[] names,
    string providerName,
    string providerKey)
    {
        var cacheKeys = names.Select(x => CalculateCacheKey(x, providerName, providerKey)).ToList();

        Logger.LogInformation($"PermissionStore.GetCacheItemAsync: {string.Join(",", cacheKeys)}");

        var cacheItems = (await Cache.GetManyAsync(cacheKeys)).ToList();
        if (cacheItems.All(x => x.Value != null))
        {
            Logger.LogInformation($"Found in the cache: {string.Join(",", cacheKeys)}");
            return cacheItems;
        }

        var notCacheKeys = cacheItems.Where(x => x.Value == null).Select(x => x.Key).ToList();

        Logger.LogInformation($"Not found in the cache: {string.Join(",", notCacheKeys)}");

        var newCacheItems = await SetCacheItemsAsync(providerName, providerKey, notCacheKeys);

        var result = new List&lt;KeyValuePair&lt;string, PermissionGrantCacheItem&gt;>();
        foreach (var key in cacheKeys)
        {
            var item = newCacheItems.FirstOrDefault(x => x.Key == key);
            if (item.Value == null)
            {
                item = cacheItems.FirstOrDefault(x => x.Key == key);
            }

            result.Add(new KeyValuePair&lt;string, PermissionGrantCacheItem&gt;(key, item.Value));
        }

        return result;
    }

    protected virtual async Task&lt;List&lt;KeyValuePair&lt;string, PermissionGrantCacheItem&gt;>> SetCacheItemsAsync(
    string providerName,
    string providerKey,
    List&lt;string&gt; notCacheKeys)
    {
        var permissions = (await PermissionDefinitionManager.GetPermissionsAsync())
        .Where(x => notCacheKeys.Any(k => GetPermissionNameFormCacheKeyOrNull(k) == x.Name)).ToList();

        Logger.LogInformation($"Getting not cache granted permissions from the repository for this provider name,key: {providerName},{providerKey}");

        var grantedPermissionsHashSet = new HashSet&lt;string&gt;(
        (await PermissionGrantRepository.GetListAsync(notCacheKeys.Select(GetPermissionNameFormCacheKeyOrNull).ToArray(), providerName, providerKey)).Select(p => p.Name)
        );
        var nCacheKeys = notCacheKeys.Select(GetPermissionNameFormCacheKeyOrNull).ToArray();

        foreach (var item in await GetEnzimPermissions(providerName, providerKey))
        {
            grantedPermissionsHashSet.AddIfNotContains(item);
        }
        Logger.LogInformation($"Setting the cache items. Count: {permissions.Count}");

        var cacheItems = new List&lt;KeyValuePair&lt;string, PermissionGrantCacheItem&gt;>();

        foreach (var permission in permissions)
        {
            var isGranted = grantedPermissionsHashSet.Contains(permission.Name);

            cacheItems.Add(new KeyValuePair&lt;string, PermissionGrantCacheItem&gt;(
            CalculateCacheKey(permission.Name, providerName, providerKey),
            new PermissionGrantCacheItem(isGranted))
            );
        }

        await Cache.SetManyAsync(cacheItems);

        Logger.LogInformation($"Finished setting the cache items. Count: {permissions.Count}");

        return cacheItems;
    }

    protected virtual string CalculateCacheKey(string name, string providerName, string providerKey)
    {
        return PermissionGrantCacheItem.CalculateCacheKey(name, providerName, providerKey);
    }

    protected virtual string GetPermissionNameFormCacheKeyOrNull(string key)
    {
        //TODO: throw ex when name is null?
        return PermissionGrantCacheItem.GetPermissionNameFormCacheKeyOrNull(key);
    }

    private async Task&lt;List&lt;string&gt;> GetEnzimPermissions(string providerName, string providerKey)
    {
        List&lt;string&gt; permissions = new List&lt;string&gt;();
        
        return permissions;
    }
}

}

and we added Application project's ConfigureServices

    context.Services.Replace(
    ServiceDescriptor.Transient&lt;IPermissionStore, MyPermissionStore&gt;()
    );
  • ABP Framework version: v8.1.4
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server,
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: Hi; Permissions can change in projects. They are not only added but also removed and modified. When running the DB migration project, it does not update or delete permissions on the code side; it only adds the new ones to the [dbo].[AbpPermissions] table.

we request that the DB migrator project updates the relevant tables with the latest permissions from the code side when it runs.

What would your recommendation be on this issue?

  • ABP Framework version: v8.2.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server
  • Tiered (f): yes

We use redis for hangfire database ; we add HttpApi.Host project this code

private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration) { string redisConfig = configuration["Redis:HangfireRedis"].ToString();

context.Services.AddHangfire(config =>
{

    config.UseRedisStorage(redisConfig, new RedisStorageOptions()
    {
        Prefix = "hangfire:app1:",
          Db = 8,
    });
    //config.UseRecurringJobAdmin(typeof(StartupBase).Assembly;


});
context.Services.AddHangfireServer(options =>
{
    options.ServerName = "EnzimWeb";

});

}

But we get error

2024-07-04 16:34:28.486 +03:00 [FTL] Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.AuditLogging.AbpAuditLoggingApplicationModule, Volo.Abp.AuditLogging.Application, Version=8.2.0.0, Culture=neutral, PublicKeyToken=null: Cannot convert period: 86400000 to cron expression, use HangfireBackgroundWorkerBase to define worker. See the inner exception for details. ---> Volo.Abp.AbpException: Cannot convert period: 86400000 to cron expression, use HangfireBackgroundWorkerBase to define worker at Volo.Abp.BackgroundWorkers.Hangfire.HangfireBackgroundWorkerManager.GetCron(Int32 period) at Volo.Abp.BackgroundWorkers.Hangfire.HangfireBackgroundWorkerManager.AddAsync(IBackgroundWorker worker, CancellationToken cancellationToken) at Volo.Abp.AuditLogging.AbpAuditLoggingApplicationModule.OnApplicationInitializationAsync(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.InitializeAsync(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModulesAsync() at Volo.Abp.AbpApplicationWithExternalServiceProvider.InitializeAsync(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplicationAsync(IApplicationBuilder app) at EnzimWeb.Program.Main(String[] args) in F:\azure\enzimiber\src\EnzimWeb.HttpApi.Host\Program.cs:line 38

Question
  • ABP Framework version: v8.0.1
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Tiered
  • Exception message and full stack trace: No Exception
  • Steps to reproduce the issue: Hi. Our problem is When the user comes to our Blazor page with querystring , we want him to be directed to the same link again after successful login. For example, when the user comes to us with the URL https://testproject.com\myuser?id=1234, we want the user to return to the \myuser?id=1234 page instead of the default page when returning to the Blazor application after authentication.We try to override redirect_uri but as i understand correctly OpenIdDict library overrides it Thank you
  • ABP Framework version: v8.0.0
  • UI Type:Blazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Hi. we developed Notification(Bell) Service. We apply step by step https://support.abp.io/QA/Questions/3592/How-do-I-force-the-Blazor-toolbar-to-refresh document . and we developed backend services. how can we add notification to user interface without refreshing can you share sample code.

  • ABP Framework version: v8.0
  • UI Type: lazor Server
  • Database System: EF Core (SQL Server)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

we developed Notifications(Bell Icon) component with https://docs.abp.io/en/abp/latest/UI/Blazor/Toolbars document. We Used LeptonX template. Notifications(Bell Icon) is showing but onclick event not working. our code

Blazor Module cs

private void ConfigureToolbar()
{
    Configure<AbpToolbarOptions>(options =>
    {
        options.Contributors.Add(new MyToolbarContributor());
    });
}

public class MyToolbarContributor : IToolbarContributor
{
    public Task ConfigureToolbarAsync(IToolbarConfigurationContext context)
    {
        if (context.Toolbar.Name ==  LeptonXToolbars.Main)
        {
            context.Toolbar.Items.Insert(0, new ToolbarItem(typeof(NotificationsComponent)));
        }

        return Task.CompletedTask;
    }
}
and NotificationsComponent.razor

 

@inherits Volo.Abp.AspNetCore.Components.AbpComponentBase
<div class="nav-link">
    <i class="fas fa-bell" @onclick="ShowNotifications"></i>
</div>
@code {
    private async Task ShowNotifications()
    {
        await Message.Info("TODO: Show notifications");
    }
}

  • ABP Framework version: v7.3.4
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server
    • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

we add this code to all configuresservices

Configure<AbpMultiTenancyOptions>(options =>
{
    options.IsEnabled = MultiTenancyConsts.IsEnabled;
});

and we Replace Services MultiTenantConnectionStringResolver with https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.MultiTenancy/Volo/Abp/MultiTenancy/MultiTenantConnectionStringResolver.cs

and we add connection string to tenant configuration(Test Tenant)

But we login with test tenant with special connection string but abp loaded to grid with data to default connection(Host) string database

MultiTenant ConnectionString property doesn't work.

  • ABP Framework version: v7.4.0
  • UI Type: Blazor Server
  • Database System: EF Core (SQL Server.)
  • **Tiered (for MVC) **: yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

Kion ve simdide Medicana projemizde Abp.io kullanıyoruz. medicanadaki senaryo biraz farklı. mevcut veritabanının kullanmamız gerekiyor. tüm permissionları menu yetkilerini oradan alıyoruz. bu yuzden kullanıcı logout oldugunda redisten permissionlarını silerek tekrar login olduguda medicananın dbsinden tekrar yüklemek istiyoruz. kod lokalde sorunsuz calısıyor ancak IIS servera surum cıktıgımızda redis keylerini silmedigi için yetkisi medicana tarfında degişse bile abp.io tarafında aynı kalıyor. 1 haftadır ugrasıyoruz son care sizden destek almak için yazmak istedim yardımlarınız için şimdiden saolun

Showing 1 to 10 of 10 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.0.0-preview. Updated on June 23, 2025, 11:58