hi
The DynamicLocalizationResourceContributor and DynamicResourceLocalizer are coming from Language Management.
Do you have license to download the source code of this module?
hi
I can send you the full log via wetransfer if you want.
Please. liming.ma@volosoft.com
The permissions get from the database based on the user ID and user role in claims.
hi
The claims are coming from jwt token. So jwt has to contain the claim.
hi
The jwt token has to contain the BrowserInfo claim. This is by design.
hi
Change the Program as below, then republish to IIS and get logs.txt again.
Thanks
using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace acme.logistics;
public class Program
{
public async static Task<int> Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateBootstrapLogger();
try
{
Log.Information("Starting MyCompanyName.MyProjectName.HttpApi.Host.");
var builder = WebApplication.CreateBuilder(args);
builder.Host
.AddAppSettingsSecretsJson()
.UseAutofac()
.UseSerilog((context, services, loggerConfiguration) =>
{
loggerConfiguration
.MinimumLevel.Debug()
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console());
});
await builder.AddApplicationAsync<logisticsHttpApiHostModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
await app.RunAsync();
return 0;
}
catch (Exception ex)
{
if (ex is HostAbortedException)
{
throw;
}
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
}
Great
hi
I see, Please share the Program.cs of your logistics.HttpApi.Host project.
We need to output more logs.
Thanks.
hi
Can you share a screenshot of your solution structure?
How many web projects are in your solution?
hi
We will fix this in the next version. You can temporarily solve it by replace the CachedObjectExtensionsDtoService
https://github.com/abpframework/abp/pull/21675
using System;
using System.Collections.Generic;
using System.Linq;
using Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending;
using Volo.Abp.DependencyInjection;
using Volo.Abp.ObjectExtending;
using Volo.Abp.ObjectExtending.Modularity;
namespace MyCompanyName.MyProjectName.Web;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(MyCachedObjectExtensionsDtoService), typeof(CachedObjectExtensionsDtoService), typeof(ICachedObjectExtensionsDtoService))]
public class MyCachedObjectExtensionsDtoService : CachedObjectExtensionsDtoService
{
public MyCachedObjectExtensionsDtoService(IExtensionPropertyAttributeDtoFactory extensionPropertyAttributeDtoFactory)
: base(extensionPropertyAttributeDtoFactory)
{
}
protected override void FillEnums(ObjectExtensionsDto objectExtensionsDto)
{
var enumProperties = ObjectExtensionManager.Instance.Modules().Values
.SelectMany(
m => m.Entities.Values.SelectMany(
e => e.GetProperties()
)
)
.Where(p => p.Type.IsEnum || IsNullableEnum(p.Type))
.ToList();
foreach (var enumProperty in enumProperties)
{
// ReSharper disable once AssignNullToNotNullAttribute (enumProperty.Type.FullName can not be null for this case)
objectExtensionsDto.Enums[enumProperty.Type.FullName!] = CreateExtensionEnumDto(enumProperty);
}
}
protected override ExtensionEnumDto CreateExtensionEnumDto(ExtensionPropertyConfiguration enumProperty)
{
var extensionEnumDto = new ExtensionEnumDto
{
Fields = new List<ExtensionEnumFieldDto>(),
LocalizationResource = enumProperty.GetLocalizationResourceNameOrNull()
};
var enumType = enumProperty.Type.IsEnum
? enumProperty.Type
: IsNullableEnum(enumProperty.Type)
? Nullable.GetUnderlyingType(enumProperty.Type)
: null;
if (enumType == null)
{
return extensionEnumDto;
}
foreach (var enumValue in enumType.GetEnumValues())
{
extensionEnumDto.Fields.Add(
new ExtensionEnumFieldDto
{
Name = enumType.GetEnumName(enumValue)!,
Value = enumValue
}
);
}
return extensionEnumDto;
}
public bool IsNullableEnum(Type type)
{
return type.IsGenericType &&
type.GetGenericTypeDefinition() == typeof(Nullable<>) &&
type.GenericTypeArguments.Length == 1 &&
type.GenericTypeArguments[0].IsEnum;
}
}