Activities of "cangunaydin"

  • ABP Framework version: v9.0.x
  • Database System: EF Core (PostgreSQL)
  • Exception message and full stack trace:
  • [22:51:05 ERR] There is no such an entity. Entity type: Volo.Abp.Identity.IdentityUser, id: 3a173a2b-c7d5-efa2-a1a7-ea8c589cbbff Volo.Abp.Domain.Entities.EntityNotFoundException: There is no such an entity. Entity type: Volo.Abp.Identity.IdentityUser, id: 3a173a2b-c7d5-efa2-a1a7-ea8c589cbbff at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository3.GetAsync(TKey id, Boolean includeDetails, CancellationToken cancellationToken) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.Identity.Gdpr.IdentityGdprEventHandler.HandleEventAsync(GdprUserDataRequestedEto eventData) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync() at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.EventBus.EventHandlerInvoker.InvokeAsync(IEventHandler eventHandler, Object eventData, Type eventType) at Volo.Abp.EventBus.EventBusBase.TriggerHandlerAsync(IEventHandlerFactory asyncHandlerFactory, Type eventType, Object eventData, List1 exceptions, InboxConfig inboxConfig) at System.AbpExceptionExtensions.ReThrow(Exception exception) at Volo.Abp.EventBus.EventBusBase.ThrowOriginalExceptions(Type eventType, List1 exceptions) at Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type eventType, Object eventData) at Volo.Abp.EventBus.Distributed.DistributedEventBusBase.TriggerHandlersDirectAsync(Type eventType, Object eventData) at Volo.Abp.EventBus.RabbitMq.RabbitMqDistributedEventBus.ProcessEventAsync(IModel channel, BasicDeliverEventArgs ea) at Volo.Abp.RabbitMQ.RabbitMqMessageConsumer.HandleIncomingMessageAsync(Object sender, BasicDeliverEventArgs basicDeliverEventArgs)

Hello i have these users in my database.

whenever i click prepare button for gdpr it throws an error on the background. It couldn't find the user in the database and since rabbitmq is the distributed message handler it always retries again and again. So it is full of errors repeating again maybe in the modules that participates for the event it is better to use try catch instead of throwing error. Is it possible to change that? and why the identity module can not find the id that's kind of weird. is it a bug?

  • ABP Framework version: v9.0.x
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, I want to add an extra property to organization units, i have managed to that in the backend with module extension. When i try to extend the angular side it does not seem i have an extension point there.

it seems like i can not extend the organization units when i look at this code.

export type IdentityCreateFormPropContributors = Partial<{
  [eIdentityComponents.Claims]: CreateFormPropContributorCallback<ClaimTypeDto>[];
  [eIdentityComponents.Roles]: CreateFormPropContributorCallback<IdentityRoleDto>[];
  [eIdentityComponents.Users]: CreateFormPropContributorCallback<IdentityUserDto>[];
}>;

here is what i have tried according to documentation https://abp.io/docs/latest/framework/ui/angular/dynamic-form-extensions#step-1-create-form-prop-contributors and here is my code. can you give some suggestions about how can i extend the organization units?


  import { ePropType, FormProp, FormPropList } from '@abp/ng.components/extensible';

import {  OrganizationUnitWithDetailsDto } from '@volo/abp.ng.identity/proxy';
import {
  eIdentityComponents,
  IdentityCreateFormPropContributors
} from '@volo/abp.ng.identity';

  

const shareOfVoiceProp = new FormProp<OrganizationUnitWithDetailsDto>({
    type: ePropType.Number,
    name: 'ShareOfVoice',
    displayName: '::DisplayName:ShareOfVoice'
  });
  
  export function shareOfVoicePropContributor(propList: FormPropList<OrganizationUnitWithDetailsDto>) {
    propList.addByIndex(shareOfVoiceProp, 1);
  }


  export const identityCreateFormPropContributors: IdentityCreateFormPropContributors = {
    // enum indicates the page to add contributors to
    [eIdentityComponents.OrganizationUnits]: [
      shareOfVoicePropContributor
      // You can add more contributors here
    ],
  };
  
  export const identityEditFormPropContributors = identityCreateFormPropContributors;
  // you may define different contributors for edit form if you like```
  • ABP Framework version: v9.1
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): no (but does not matter)

When you have a feature in 3 layers structure like

* Signage
    * Playlist
        * ShareOfVoice

in angular ui you can not see the branches in this order. it is always 2 layers. here is the sample code.

public class BookStoreFeatureDefinitionProvider : FeatureDefinitionProvider
{
    public override void Define(IFeatureDefinitionContext context)
    {
        var group = context.AddGroup(BookStoreFeatures.GroupName,
        L("Feature:BookStore"));


     

        var signageFeature = group.AddFeature(BookStoreFeatures.Signage.Default,
            "false",
            L("Feature:BookStoreSignage"),
            L("Feature:BookStoreSignageDescription"),
            new ToggleStringValueType());

        var playlistFeature = signageFeature.CreateChild(BookStoreFeatures.Signage.Playlist.Default,
            "false",
            L("Feature:BookStorePlaylist"),
            L("Feature:BookStorePlaylistDescription"),
            new ToggleStringValueType());
        var playlistShareOfVoiceFeature = playlistFeature.CreateChild(BookStoreFeatures.Signage.Playlist.ShareOfVoice,
            "false",
            L("Feature:BookStorePlaylistShareOfVoice"),
            L("Feature:BookStorePlaylistShareOfVoiceDescription"),
            new ToggleStringValueType());

    }
    private static LocalizableString L(string name)
    {
        return LocalizableString.Create<BookStoreResource>(name);
    }
}

here is the output for it.

  • ABP Framework version: v9
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL.)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello i am having a problem when i am trying to generate a proxy for my main module. When i try to run the command abp generate-proxy -t ng -m doohlink -u https://localhost:44389 i am getting

[API Not Available] Request to https://localhost:44389/api/abp/api-definition is unsuccessful. Please double-check the URL in the source project environment and make sure your application is up and running. but the url is available

I can send you the api-definition file if you want. I am using kestrel to debug the application. And i tried dotnet run from the root also. Any assistance would be appreciated

  • ABP Framework version: v9
  • UI Type: Angular
  • Database System: EF Core ( PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello my question is about how to implement hangfire. I am using hangfire in my abp project. But i am having some weird behavior. To make the things simpler i can post some basic code for my module and hangfire implementation.

[DependsOn(
    typeof(AbpAspNetCoreMvcUiMultiTenancyModule),
    typeof(AbpAspNetCoreAuthenticationOpenIdConnectModule),
    typeof(PopManagementModule),
    typeof(AbpBlobStoringAzureModule),
    typeof(AbpBackgroundJobsHangfireModule),
    typeof(AbpBackgroundWorkersHangfireModule),
    typeof(AbpAspNetCoreMvcUiLeptonXThemeModule),
    typeof(DoohlinkSharedHostingMicroservicesModule)
)]
public class PopManagementHttpApiHostModule:AbpModule
{
    //etc...

and here is how i configure hangfire.

private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddHangfire(config =>
        {
            var options = new PostgreSqlStorageOptions
            {
                DistributedLockTimeout = TimeSpan.FromMinutes(1)
            };

            config.UsePostgreSqlStorage(postgresSqlStorageConfig =>
            {
                postgresSqlStorageConfig.UseNpgsqlConnection(configuration.GetConnectionString("PopManagement"));
            }, options);
        
        });
    }

and here is my project structure (part of my project)

so when i run the project everythings works fine. But the weird part is i don't see any background jobs enqueued in my hangfire dashboard with parameters.

what i mean by that is i have this background job.

public class PopJob : AsyncBackgroundJob<PopJobBto>, ITransientDependency
{
    private readonly IPopRepository _popRepository;
    private readonly IBlobContainer<PopCsvContainer> _popCsvContainer;
    private readonly IGuidGenerator _guidGenerator;

    public PopJob(IPopRepository popRepository, IBlobContainer<PopCsvContainer> popCsvContainer,
        IGuidGenerator guidGenerator)
    {
        _popRepository = popRepository;
        _popCsvContainer = popCsvContainer;
        _guidGenerator = guidGenerator;
    }

    public override async Task ExecuteAsync(PopJobBto args)
    {
        var file = await _popCsvContainer.GetOrNullAsync(args.FileName);
        if (file == null)
        {
            return;
        }

        var csvData = System.Text.Encoding.UTF8.GetString(GetBytesFromStream(file));
        var items= ConvertFromCsv(csvData);
        await _popRepository.InsertBulkAsync(items);
    }
public sealed record PopJobBto(string FileName);
public class PopAppService : PopManagementAppService, IPopAppService
{
    private readonly IBlobContainer<PopCsvContainer> _blobContainer;
    private readonly IClock _clock;
    private readonly IBackgroundJobManager _backgroundJobManager;
    private readonly IDistributedCache<PopCacheItem, PopCacheItemKey> _distributedCache;
    private readonly IPopRepository _popRepository;
    private readonly IScreenRepository _screenRepository;
    private readonly IFileRepository _fileRepository;

    public PopAppService(IBlobContainer<PopCsvContainer> blobContainer, IClock clock,
        IBackgroundJobManager backgroundJobManager, IDistributedCache<PopCacheItem, PopCacheItemKey> distributedCache,
        IPopRepository popRepository, IScreenRepository screenRepository, IFileRepository fileRepository)
    {
        _blobContainer = blobContainer;
        _clock = clock;
        _backgroundJobManager = backgroundJobManager;
        _distributedCache = distributedCache;
        _popRepository = popRepository;
        _screenRepository = screenRepository;
        _fileRepository = fileRepository;
    }
 public async Task CreateAsync(CreatePopDto input)
    {
        //create csv file from the input and send it to azure blob storage
        var csvData = ConvertToCsv(input.Items);
        var csvBytes = GetCsvBytes(csvData);
        // Generate the file name using the first item's DeviceId and the current date and time
        if (!input.Items.Any())
        {
            return;
        }

        var deviceId = input.Items.First().DeviceId;
        var dateTime = _clock.Now.ToString("yyyyMMdd_HHmmss");
        var fileName = $"{deviceId}_{dateTime}.csv";
        await _blobContainer.SaveAsync(fileName, csvBytes);
        await _backgroundJobManager.EnqueueAsync(new PopJobBto(fileName));
    }

so in hangfire i am expecting to see the file name and how it is serialized. But all i see is background workers.

I believe it still uses default fifo implementation cause i can see that it hits background job. But sometimes it hangs and never fire the background job, could be because of the distributed lock i suppose. What am i missing over here. Can you point me to the right direction?

  • ABP Framework version: v9
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello i have a very general question about how the unitofwork is working in Abp. If i use multiple db context with separate connection strings in my modular monolith app and if i want to do multiple operations with one unitofwork. Is it going to be a problem? since each of the modules are going to have different databases, i want to ask how does transaction is going to be handled. If i raise a domain event and as a side effect in the same scope i want to also insert a record on another database server? Or if the app has a separate databases for each module on one database server. Thank you for the assistance.

  • ABP Framework version: v9.0.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, When i try to serve a file with chunks, i am getting an error from abp studio middleware. here is my code.

    [HttpGet]
    [Route("download")]
    public async Task DownloadAsync([FromQuery(Name = "id")]  Guid? id,[FromQuery(Name = "tenantId")]  Guid? tenantId)
    {
        Check.NotNull(id, nameof(id));
        Check.NotNull(tenantId, nameof(tenantId));
        var file = await _fileAppService.GetAsync(id.Value, tenantId.Value);
        HttpContext.Response.ContentType = file.MimeType;
        await HandleContentDownload(file, 0, file.Size);
    }

    private async Task HandleContentDownload(FileDto file, long startOffset, long length)
    {
        using (CurrentTenant.Change(file.TenantId))
        {
            var tempOffset = (int)startOffset;
            var tempLength = length;
            var chunkLength = 1024 * 1024; //1mb

            var outputStream = HttpContext.Response.Body;
            while (tempOffset < tempLength)
            {
                var remainingLength = tempLength - tempOffset;
                if (remainingLength < chunkLength)
                {
                    chunkLength = (int)(tempLength - tempOffset);
                }

                await using (var stream = await _fileAppService.DownloadAsync(file.Id, tempOffset, chunkLength))
                {
                    await outputStream.WriteAsync((stream as MemoryStream)?.ToArray());
                }

                tempOffset += chunkLength;
            }

            await outputStream.FlushAsync();
        }
    }

i am getting this error.

System.InvalidOperationException: Writing to the response body is invalid for responses with status code 204.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.FirstWriteAsyncInternal(ReadOnlyMemory`1 data, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.WritePipeAsync(ReadOnlyMemory`1 data, CancellationToken cancellationToken)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.WriteAsync(Byte[] buffer, Int32 offset, Int32 count, CancellationToken cancellationToken)
   at System.IO.MemoryStream.CopyToAsync(Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
   at System.IO.Stream.CopyToAsync(Stream destination)
   at Volo.Abp.Studio.Client.AspNetCore.AbpStudioMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.Studio.Client.AspNetCore.AbpStudioMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Volo.Abp.Studio.Client.AspNetCore.AbpStudioMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
   at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Volo.Abp.AspNetCore.Mvc.Libs.AbpMvcLibsService.<CheckLibs>b__1_0(HttpContext httpContext, RequestDelegate next)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)

what can be done to fix the problem? any idea? somehow can i leave this method out of AbpStudioMiddleware?

  • ABP Framework version: v9.0.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, I realized that maui template is still using Microsoft.Windows.CsWin32 nuget package for msix. As i know you can debug it without msix by giving property <WindowsPackageType>None</WindowsPackageType>

and if you do that with the startup project you are getting winrt exception. And you can not load the fonts that comes from UraniumUI.Icons package. It throws an error. it can not load the fonts that comes with it. To generate the error you can uncheck the "Create MSIX Package" and try to debug it.

so to create msix packages you do not need to depend on Microsoft.Windows.CsWin32 anymore. Just giving <WindowsPackageType>None</WindowsPackageType> and changing launchsettings.json file is enough with the values here.

{
  "profiles": {
    "Windows Machine": {
      "commandName": "MsixPackage",
      "nativeDebugging": false
    }
  }
}

by the way do not try to debug with jetbrains rider ide for msix package. I suppose it has a bug when you try to debug it, it always throws an error.

Another thing i have found is. When i create mobile solution with abp studio. It saves wrong port and url for openiddict into the db while it seeds for mobile app. So you can not log in from mobile app since port was different.

initial values that i have tried with abp studio was mvc, efcore (postgresql) with mobile support tiered.

  • ABP Framework version: v9.0.2
  • UI Type: Angular
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hello, I am trying to intercept my service from my aks cluster. Everything works fine, i can intercept the call and redirect it to my local machine.

but when i debug the app from visual studio or jetbrains, environment variables are not overridden it gets the appsettings.json values. How does abp studio overriding the environment variables that is the same with the service? am i doing sth wrong? thank you for the help.

  • ABP Framework version: v9.0.2
  • UI Type: Angular
  • Database System: EF Core ( PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:

Hello, I am trying to upgrade my project to abp v9 When i run my backend, i am getting an exception. I use Hangfire for background jobs and background workers. Here is the exception i am getting from Volo.Abp.Identity.Pro.Domain

[19:16:09 FTL] Doohlink.HttpApi.Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.Identity.AbpIdentityProDomainModule, Volo.Abp.Identity.Pro.Domain, Version=9.0.2.0, Culture=neutral, PublicKeyToken=null: Current storage doesn't support specifying queues directly for a specific job. Please use the QueueAttribute instead.. See the inner exception for details. ---> System.NotSupportedException: Current storage doesn't support specifying queues directly for a specific job. Please use the QueueAttribute instead. at Hangfire.RecurringJobManager.AddOrUpdate(String recurringJobId, Job job, String cronExpression, RecurringJobOptions options) in C:\projects\hangfire-525\src\Hangfire.Core\RecurringJobManager.cs:line 108 at Hangfire.RecurringJob.AddOrUpdate(String recurringJobId, String queue, Expression`1 methodCall, String cronExpression, RecurringJobOptions options) in C:\projects\hangfire-525\src\Hangfire.Core\RecurringJob.cs:line 568 at Volo.Abp.BackgroundWorkers.Hangfire.HangfireBackgroundWorkerManager.AddAsync(IBackgroundWorker worker, CancellationToken cancellationToken) at Volo.Abp.Identity.AbpIdentityProDomainModule.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 Doohlink.Program.Main(String[] args) in C:\dev\projects\Adzup\aspnet-core\src\Doohlink.HttpApi.Host\Program.cs:line 91

and here is how i configure my hangfire.

 private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
    {
        context.Services.AddHangfire(config =>
        {
            config.UsePostgreSqlStorage(configuration.GetConnectionString("Default"),
                new PostgreSqlStorageOptions()
                {
                    DistributedLockTimeout = TimeSpan.FromMinutes(1)
                });
        });
    }

is this a bug?

Showing 1 to 10 of 40 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 v9.3.0-preview. Updated on May 28, 2025, 08:51