Activities of "maliming"

hi

What are errors now?

Please share the full stack error.

You need to CompleteAsync the uow.


using (var uow = UnitOfWorkManager.Begin(requiresNew: true, isTransactional: false))
{
    for (int indexClass = 1; indexClass <= 10; indexClass++)
    {
        var data = await _ClassesRepository.InsertAsync(new Classes(GuidGenerator.Create())
        {
            Name = indexClass.ToString(),
            No = indexClass
        }, true);
        await CreateStudentAsync(data);
    }
    
    await uow.CompleteAsync();
}

hi

System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)

Set the ShowPII to true on your https://192.168.23.81:44367/ website.

You can add this line to Program.cs

IdentityModelEventSource.ShowPII = true;

Please share the logs of the Auth Server as well.

Thanks

hi

Can you also try to use the latest Microsoft.IdentityModel packages in your API website?

<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.5.1" />
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.5.1" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.5.1" />

hi

How can I reproduce this 404 in a new template project?

Can you share the code and steps.

Thanks.

hi

I have no experience with MAUI/Android

hi

You can create a new class and copy the code from DynamicFileProvider.cs and CachedBundleDynamicFileProvider.cs

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IDynamicFileProvider))]
public class YourDynamicFileProvider : DictionaryBasedFileProvider, IDynamicFileProvider, ISingletonDependency

hi

You can try the code below


public async Task HandleEventAsync(ProductEto eventData)
{
    if (eventData != null)
    {
        using (var unitOfWork = _unitOfWorkManager.Begin(requiresNew: true))
        {
            _currentTenant.Change(eventData.TenantId);
            try
            {
                var gmd = _objectMapper.Map<ProductEto, ProductSync>(eventData);

                await _productSyncRepository.InsertAsync(gmd);
                await unitOfWork.CompleteAsync();
            }
            catch (Exception ex)
            {
                Logger.LogError(ex, "Handle Event ProductEto Error");
            }
        }
    }
    else
    {
        Logger.LogWarning("Input data is null into handle event ProductEto");
    }
}

https://github.com/abpframework/abp/pull/19870

hi

Try to add a CachedDynamicFileProvider class to get files from Redis cache.

CachedDynamicFileProvider:

using System;
using System.Collections.Generic;
using Microsoft.Extensions.FileProviders;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.VirtualFileSystem;

namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;

[Dependency(ReplaceServices = true)]
public class CachedDynamicFileProvider : DynamicFileProvider
{
    protected IDistributedCache<InMemoryFileInfoCacheItem> Cache { get; }

    public CachedDynamicFileProvider(IDistributedCache<InMemoryFileInfoCacheItem> cache)
    {
        Cache = cache;
    }

    public override IFileInfo GetFileInfo(string? subpath)
    {
        if (subpath == null)
        {
            return new NotFoundFileInfo(subpath!);
        }

        var file = DynamicFiles.GetOrDefault(NormalizePath(subpath));
        if (file == null && (subpath.Contains(".js", StringComparison.OrdinalIgnoreCase) || subpath.Contains(".css", StringComparison.OrdinalIgnoreCase)))
        {
            var cacheItem = Cache.Get(NormalizePath(subpath));
            if (cacheItem == null)
            {
                return new NotFoundFileInfo(subpath);
            }

            var inMemoryFile = new InMemoryFileInfo(NormalizePath(subpath), cacheItem.FileContent, cacheItem.Name);
            DynamicFiles.AddOrUpdate(NormalizePath(subpath), inMemoryFile, (key, value) => inMemoryFile);
            return inMemoryFile;
        }

        return file ?? new NotFoundFileInfo(subpath);
    }

    public override void AddOrUpdate(IFileInfo fileInfo)
    {
        var filePath = fileInfo.GetVirtualOrPhysicalPathOrNull();
        Cache.GetOrAdd(filePath!, () => new InMemoryFileInfoCacheItem(filePath!, fileInfo.ReadBytes(), fileInfo.Name));
        DynamicFiles.AddOrUpdate(filePath!, fileInfo, (key, value) => fileInfo);
        ReportChange(filePath!);
    }

    public override bool Delete(string filePath)
    {
        Cache.Remove(filePath);
        if (!DynamicFiles.TryRemove(filePath, out _))
        {
            return false;
        }

        ReportChange(filePath);
        return true;
    }
}

InMemoryFileInfoCacheItem

using System;
using Volo.Abp.MultiTenancy;

namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling;

[Serializable]
[IgnoreMultiTenancy]
public class InMemoryFileInfoCacheItem
{
    public InMemoryFileInfoCacheItem(string dynamicPath, byte[] fileContent, string name)
    {
        DynamicPath = dynamicPath;
        Name = name;
        FileContent = fileContent;
    }

    public string DynamicPath { get; set; }

    public string Name { get; set; }

    public byte[] FileContent { get; set; }
}

Answer

Great

Showing 6201 to 6210 of 12925 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.8.0-preview. Updated on November 11, 2026, 08:10
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.