Activities of "elie.khadij"

Hello, we are using IRemoteStreamContent to upload images in our solution. let's say we have a DTO called A identified like so:

public record A {
    public string Name {get; init;}
    public B Bs {get; init;}
    public List <IRemoteStreamContent> Images {get; init} = [];
}

Let's say we have an Application Service named TestApplicationService. In this service, I'm calling a Custom Blob Service that uploads Azure blob images.

public class TestAppService : AppService {
    public Task<bool> CreateRecordA(A dto)
    {
        foreach(var image in dto.Images)
        {
         await blobService.SaveBlobAsync(image);
        }
        
        return true;
    }
}

as for the Custom blob Service I will expose the method as follows:

    public async Task<bool> SaveBlobAsync(IRemoteStreamContent file, CancellationToken cancellationToken = default)
    {
        using var memoryStream = new MemoryStream();
        await file.GetStream().CopyToAsync(memoryStream, cancellationToken);
        var fileContent = memoryStream.ToArray();
        await memoryStream.FlushAsync(cancellationToken);
        await blobContainer.SaveAsync(CleanFileName(file.FileName!), fileContent, true, cancellationToken);

        return true;
    }

In our host module we added this line in conventional controllers:

        Configure<AbpAspNetCoreMvcOptions>(options =>
        {
            options.ConventionalControllers.FormBodyBindingIgnoredTypes.Add(typeof(A));
            options.ConventionalControllers.Create(typeof(TestApplicationModule).Assembly);
        });

The problem is that whenever I have more than 1 image in my dto we are facing an exception of HTTP stream positioning changed unexpectedly, noting that we followed step by step https://abp.io/docs/latest/framework/architecture/domain-driven-design/application-services#miscellaneous

  • Exception message and full stack trace:
System.InvalidOperationException: The inner stream position has changed unexpectedly.
   at Microsoft.AspNetCore.Http.ReferenceReadStream.VerifyPosition()
   at Microsoft.AspNetCore.Http.ReferenceReadStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
   at System.IO.Stream.&lt;CopyToAsync&gt;g__Core|27_0(Stream source, Stream destination, Int32 bufferSize, CancellationToken cancellationToken)
   at Totssy_Backend.BuildingBlocks.Services.Blob.BlobService.SaveBlobAsync(IRemoteStreamContent file, CancellationToken cancellationToken) in C:\Repos\Lykos\Totssy-Backend\src\Totssy_Backend.BuildingBlocks\Services\Blob\BlobService.cs:line 80
   at StockManager.Services.Catalog.CatalogsAppService.PostProductAsync(CreateProductDto productDto)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.&lt;InvokeActionMethodAsync&gt;g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  • Steps to reproduce the issue:
Question
  • ABP Framework version: v8.2.1
  • UI Type: Angular /
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue: We are using GDPR Pro module with its default configuration. The thing is we are calling DELETE /api/gdpr/requests since as per documentation it will delete user data and delete permanently the account. Based on our traces, nothing is going wrong the endpoint returning 204 and showing in log Get dynamic claims of the account in hand retrieved from cache. When the request is finished, im going to redis and search for a key that has the user Guid im still able to retrieve the permission grants of the user and when i query the database i still find the user in AbpUsers table and can login normally. To bypass the issue i created an event handler https://abp.io/community/articles/abp-commercial-gdpr-module-overview-kvmsm3ku in order to hard delete the user, apparently there is something competing with my event handler since it requires me multiple request to catch the event in my handler. any idea?
Showing 1 to 2 of 2 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.3.0-preview. Updated on March 02, 2026, 08:48
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.