Activities of "liangshiwei"

Hi,

See: https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#find-your-apps-openid-configuration-document-uri

The Authority should be https://login.microsoftonline.com/{tenant}/v2.0

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);

  • QaDomainErrorCodes.CanNotVoteYourOwnAnswer is 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");

Hi,

I can't reproduce the problem.

Here is my test code:

BusinessException

UserFriendlyException

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

When you create a new project, you can see the MenuContributor class.

Define permission:

Update MenuContributor

Hi,

ABP has an eshop microservice example, you can take a look:

https://github.com/abpframework/eShopOnAbp

Showing 4731 to 4740 of 6693 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.1.0-preview. Updated on November 07, 2025, 08:20