Yes, I can access the openId configuration metadata for my tenant, also on the logs I can see the openId metadata. The error that I am getting is this:
Please share the full logs, thanks.
Hi,
Let me explain how it works.
$"{Authority}/.well-known/openid-configuration
)The configuration document endpoint will responsed:
token_endpoint
to request access_token via resource-owner-password-flowYou can try access to https://login.microsoftonline.com/{tenant}/v2.0.well-known/openid-configuration
to check it.
PS: Don't forget replace {tenant}.
This is the point about "if there is no localization text" that annoy me
If you want to show the error message if there is no localization text, you can try this:
public class MyBusinessException: BusinessException, IUserFriendlyException
{
public MyBusinessException(string code, string message) : base(code: code, message: message)
{
}
}
throw new MyBusinessException("App:10001" , "The error message");
In this way, if there is no App:10001
localization text, it will show the "The error message"
Hi,
https://docs.abp.io/en/abp/latest/Exception-Handling#business-exceptions
throw new BusinessException(QaErrorCodes.CanNotVoteYourOwnAnswer);
QaErrorCodes.CanNotVoteYourOwnAnswer is just a const string. The following error code format is recommended:
<code-namespace>:<error-code> Volo.Qa:010002
it expects a code,
And see this: https://docs.abp.io/en/abp/latest/Exception-Handling#using-error-codes
You have to configure the code namespaces map.
For example:
throw new BusinessException(QaDomainErrorCodes.CanNotVoteYourOwnAnswer);
Volo.Qa:010002
in this example.services.Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("Volo.Qa", typeof(QaResource));
});
{
"culture": "en",
"texts": {
"Volo.Qa:010002": "You can not vote your own answer!"
}
}
Hi,
Yes, this is by design.
BusinessException
will show the generic error message if there is no localization text
The document explains as well: https://docs.abp.io/en/abp/latest/Exception-Handling#business-exceptions
However, you can try this:
public class MyBusinessException : BusinessException, IUserFriendlyException
{
public MyBusinessException(string message) : base(code: Empty, message: message)
{
}
}
throw new MyBusinessException("Message");
EshopOnAbp.PublicWeb project do not depend on any microservice module presentation layer
Sorry, the EShopOnAbp uses angular as the backend UI.
If you create a microservice template, you will see it.
I will try to ask the question from another perspective. If I need to convert the EshopOnAbp project to monolith app, in where should i create the user interface for ProductDetail page?
As I said, the module's web project is just a Razor Libary, Its purpose is to create a reusable UI library, you can write all UI codes in one Web application or split into multiple UI libraries and use it in the Web application.
About Razor library: https://learn.microsoft.com/en-us/aspnet/core/razor-pages/ui-class?view=aspnetcore-6.0&tabs=visual-studio
As i understand (pls correct me if i am wrong), In microservice solution you don't use the user interface(or web layer) for microservices instead one web app that will unify whole views
It's up to you, ABP also supports creating modules without UI: https://docs.abp.io/en/commercial/latest/startup-templates/module/creating-a-new-solution#without-user-interface
Of course, the UI layer should be one web app, actually PublicWebApp
is it, It just references the UI class library of other modules.
So here is the question my project will stay monolith for a while and according to changes it might evolve to microservices in the future, while my modules are monolith
No actually, you can create a Product
module, Order
module, etc...
See: https://docs.abp.io/en/abp/latest/Microservice-Architecture#microservice-for-new-applications
ABP provides Identity, Saas, Permission ... modules, they are completely separate solutions, but we can make them part of a monolithic application(app pro template) or as independently deployed services(microservice template)
Hi
You can see the document: https://docs.abp.io/en/abp/latest/Exception-Handling#using-error-codes
We also throw a BusinessException
in our modules, you need to configure the localization
https://github.com/abpframework/abp/blob/dev/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityRoleManager.cs#L67