Activities of "kkmy"

Thanks!

Hi EngincanV,

The code that you provided for the method is not like this in my project and the new project that is created with the version 9.3.5 recently. The following is how the particular method is created:

private void ConfigureAuthentication(ServiceConfigurationContext context)
{
    context.Services.ForwardIdentityAuthenticationForBearer(
        OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme
    );
    context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
    {
        options.IsDynamicClaimsEnabled = true;
    });
}

We do not have the code block that is given by the AI-Bot. Moreover, I have created a new project and it does not have this block neither.

This works, thank you so much.

Got it!

Oh I see!

Does this mean that it is better to add app.UseAbpStudioLink(); again after the next version? Or let it be removed like this?

It worked perfectly, thank you so much!

Though, I really wonder what is the corelation between AbpStudioLink and IRemoteStreamContent if it is not a secret? :) What makes it does not work?

public async Task< IRemoteStreamContent > ExportAsync(ExportDto input)
{
    var contents = new Dictionary<string, byte[]>();
    var discardedContents = new Dictionary<string, byte[]>();

    FillMuyCompressionItems(ref contents, ref discardedContents);
    FillMlCompressionItems(ref contents, ref discardedContents);
    FillAkbCompressionItems(ref contents, ref discardedContents);
    FillCkCompressionItems(ref contents, ref discardedContents);

    var zipFileName = "EXPORT.zip";

    var mainZipFileStream = new FileStream(Path.Join(Path.GetTempPath(), zipFileName), FileMode.Create, FileAccess.ReadWrite);

    using (var zipArchive = new ZipArchive(mainZipFileStream, ZipArchiveMode.Create, true))
    {
        for (var i = 0; i < contents.Count; i++)
        {
            var item = contents.ElementAt(i);
            
            using var originalFileStream = new MemoryStream(item.Value);

            var zipEntry = zipArchive.CreateEntry(item.Key, CompressionLevel.Fastest);

            await using var zipEntryStream = zipEntry.Open();

            await originalFileStream.CopyToAsync(zipEntryStream);
        }
    }

    mainZipFileStream.Seek(0, SeekOrigin.Begin);

    return new RemoteStreamContent(mainZipFileStream, zipFileName, FileTypes.Zip.ContentType);
}
public async Task< FileStreamResult > ExportAsync(ExportDto input)
{
    var contents = new Dictionary<string, byte[]>();
    var discardedContents = new Dictionary<string, byte[]>();

    FillMuyCompressionItems(ref contents, ref discardedContents);
    FillMlCompressionItems(ref contents, ref discardedContents);
    FillAkbCompressionItems(ref contents, ref discardedContents);
    FillCkCompressionItems(ref contents, ref discardedContents);

    var zipFileName = "EXPORT.zip";

    var mainZipFileStream = new FileStream(Path.Join(Path.GetTempPath(), zipFileName), FileMode.Create, FileAccess.ReadWrite);

    using (var zipArchive = new ZipArchive(mainZipFileStream, ZipArchiveMode.Create, true))
    {        
        for (var i = 0; i < contents.Count; i++)
        {
            var item = contents.ElementAt(i);
        
            var originalFileStream = new FileStream(Path.Join(Path.GetTempPath(), item.Key), FileMode.Create, FileAccess.ReadWrite);
            await originalFileStream.WriteAsync(item.Value);
            originalFileStream.Seek(0, SeekOrigin.Begin);
        
            var zipEntry = zipArchive.CreateEntry(item.Key, CompressionLevel.Fastest);

            await using(var zipEntryStream = zipEntry.Open())
            await using (originalFileStream)
            {
                await originalFileStream.CopyToAsync(zipEntryStream);
            }
        }
    }

    mainZipFileStream.Seek(0, SeekOrigin.Begin);

    return new FileStreamResult(mainZipFileStream, FileTypes.Zip.ContentType);
}

Is there an example for this? Because I have written it like the following:

public async Task< **FileStreamResult** > ExportAsync()
{
    ...
    
    return new FileStreamResult(zipFileStream, FileTypes.Zip.ContentType);
}

However, proxy generation is failed:

Showing 1 to 10 of 16 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 October 30, 2025, 06:33