Hi,
ABP is a typical ASPNET Core application, you can follow the Microsoft document: https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-iis?view=aspnetcore-6.0&tabs=visual-studio
Hi,
ABP is designed to be compatible with ASP.NET Core Identity and will try to localize error code, but it doesn't support custom errors.
The solution is very simple, you just need to throw a BusinessException:
public const string PhoneNumberStartsWithZeroError = "MyProjectName:PhoneNumberStartsWithZero";
public Task<IdentityResult> ValidateAsync(UserManager<IdentityUser> manager, IdentityUser user)
{
throw new BusinessException(PhoneNumberStartsWithZeroError);
}
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("MyProjectName", typeof(MyProjectNameResource));
});
Hi,
I think you need background worker instead of background jobs
https://docs.abp.io/en/abp/latest/Background-Workers-Hangfire
Hi,
Can you try this?
public IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; }
var result = (await this.userManager.CreateAsync(user, input.Password));
try
{
result.CheckErrors();
}
catch(AbpIdentityResultException e)
{
var msg = ExceptionToErrorInfoConverter.Convert(e, false).Message;
}
Hi,
Could you provide the full steps to reproduce? thanks.
Seems there is no problem, I'm closing the question.
Hi,
As you see, I can't reproduce the problem. https://support.abp.io/QA/Questions/3896#answer-2868e332-f420-5d29-a9b4-3a0701183165
I'd like to check it remotely, please email me: shiwei.liang@volosoft.com
Hi,
You can add the following code to ConfigureOidcClient method of *.MauiModule class
Configure<OidcClientOptions>(options =>
{
options.Policy.Discovery.ValidateIssuerName = false;
});
Hi,
Sorry, I still could not reproduce the problem.
Could you share a project that can reproduce it with me? thanks. shiwei.liang@volosoft.com