hi
Can you share the full logs.txt of the authserver project?
liming.ma@volosoft.com
Thanks
You can refer to those links:
https://github.com/abpframework/abp-samples/tree/master/KeycloakDemo
https://github.com/abpframework/eShopOnAbp/pull/134
hi
I dont think i have access to that.
You can ask the owner of your organization to download it.
Thanks.
hi
What is your abp license type? Team or Business? What is your CLI version? Can you try to install the latest one?
Thanks.
Great 👍
hi
If you specify the mapper context (TaskManagementBlazorModule), you must specify it when using it.
context.Services.AddAutoMapperObjectMapper<TaskManagementBlazorModule>();
Check your base class and set the ObjectMapperContext = typeof(TaskManagementBlazorModule);
Thanks.
hi
Can you add code below to your Blazor project?
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper();
}
Thanks.
hi
You can try adding this class to your Web project. Then you can custom the messages.
namespace MyCompanyName.MyProjectName.Web;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(DefaultExceptionToErrorInfoConverter), typeof(IExceptionToErrorInfoConverter))]
public class MyDefaultExceptionToErrorInfoConverter : DefaultExceptionToErrorInfoConverter
{
public MyDefaultExceptionToErrorInfoConverter(
IOptions<AbpExceptionLocalizationOptions> localizationOptions,
IStringLocalizerFactory stringLocalizerFactory,
IStringLocalizer<AbpExceptionHandlingResource> stringLocalizer,
IServiceProvider serviceProvider)
: base(localizationOptions, stringLocalizerFactory, stringLocalizer, serviceProvider)
{
}
protected override RemoteServiceErrorInfo CreateErrorInfoWithoutCode(Exception exception, AbpExceptionHandlingOptions options)
{
var errorInfo = base.CreateErrorInfoWithoutCode(exception, options);
if (errorInfo.Code == "Forbidden" &&
errorInfo.Message == "Forbidden" &&
errorInfo.Details == "The user represented by the token is not allowed to perform the requested action.")
{
errorInfo.Code = "Your New Code Here";
errorInfo.Message = "Your New Message Here";
errorInfo.Details = "Your New Details Here";
}
return errorInfo;
}
}
hi
Your logs come from the AuthServer project. Do you also have an API website that uses JWT Bearer authentication?
Can you share the API and web projects logs?
Thanks.