The ABP “Microservice” architecture is provided as a startup template (and there is also a step-by-step Microservice Development Tutorial). The “AI” part is not a built-in ABP Framework feature; typically you build the microservices with ABP, then integrate an AI provider (OpenAI/Azure OpenAI/etc.) inside the relevant services (application layer) as a normal .NET integration.
To start a Microservice solution with Angular + PostgreSQL:
For Angular UI: generate and run the Angular app that comes with the microservice template, and use it as the client of your gateways/backends.
For PostgreSQL: select PostgreSQL in the template options (or configure connection strings accordingly) and run the migrator/db migration steps required by the generated solution (the tutorial covers running/bootstrapping the system).
Sources (validated):
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Please contact us at https://abp.io/contact.
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Chat module is a Pro (Commercial) module and it requires a valid commercial license at runtime. The docs explicitly state: “You must have an ABP Team or a higher license to use this module.” If the license check fails, the host can stop during application initialization (commonly around InitializeApplicationAsync()), which can look like “crashed without showing anything”.
Yes — “API Key” and AbpLicenseCode are different things.
AbpLicenseCode (a long encoded value). Putting the API Key into AbpLicenseCode will fail license validation (a known case results in license rejection such as ABP-LIC-0017 and the app stops during initialization).What to do in your app (Bookstore + Angular)
AbpLicenseCode value into configuration (preferably appsettings.secrets.json or an environment variable named AbpLicenseCode), not the API Key.Trial license & exploring Pro modules
Adding modules to an existing solution (general, including Angular)
Sources:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
How to create a Modular Monolith solution (so you get the same experience as the sample)
main and a modules folder).modules) and you should see:
Add -> New Module -> DDD ModuleHow to verify what type your existing project is (practical checks)
main/ and modules/ (like the Modular CRM sample).What to do with your current solution
Sources (validated)
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
SettingDefinitionProvider and override the definition of the Account setting with a new default value (false). This makes it default to false for Host and every tenant (existing and future) unless explicitly set in the database.using Volo.Abp.Account.Settings;
using Volo.Abp.Localization;
using Volo.Abp.Settings;
public class MyAccountSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
// Re-define the same setting name with a different default value.
// ABP will use your latest/overridden definition.
context.Add(
new SettingDefinition(
AccountSettingNames.IsSelfRegistrationEnabled,
defaultValue: "false",
isVisibleToClients: true
)
);
}
}
using Volo.Abp.Modularity;
using Volo.Abp.Settings;
[DependsOn(
typeof(Volo.Abp.Account.AbpAccountApplicationModule) // or the module you already depend on
)]
public class MyModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpSettingOptions>(options =>
{
options.DefinitionProviders.Add<MyAccountSettingDefinitionProvider>();
});
}
}
false everywhere immediately, run a one-time migration/seed step that sets it to false for host + all tenants via ISettingManager (so any existing stored values get overwritten).This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
In ABP Suite/Studio, custom code is only preserved inside placeholders that already exist in the template.
If you manually add a new placeholder like @*//<suite-custom-code-block-11>*@ ... @*//</suite-custom-code-block-11>*@ but the Razor template doesn’t contain that same block, regeneration will not treat it as a protected region and it can be overwritten.
That’s why:
suite-custom-code-block-1 is preserved (because it exists in the template), but your code may be moved to where block-1 is located in the generated output (because Suite re-inserts the captured content into the template’s block-1 position).suite-custom-code-block-11 is overwritten (because your project’s template likely doesn’t define block-11 for that Razor file).Definitive way to protect custom code in Razor pages/components (ABP 10.4.1):
.razor file).@*//<suite-custom-code-block-11>*@
@*//</suite-custom-code-block-11>*@
Sources (validated):
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Yes — this is a bug/regression in ABP 10.x behavior for client_credentials callers.
IdentityUserAppService.FilterRolesByCurrentUserAsync(...) uses CurrentUser.IsInRole(...) and then falls back to loading the current user via CurrentUser.GetId(). For client_credentials, there is no user id claim, so CurrentUser.Id is null and CurrentUser.GetId() throws InvalidOperationException: Nullable object must have a value, producing HTTP 500 instead of a 403/validation error.
Recommended way (until ABP fixes it): perform role assignment under a user context (impersonation/synthetic principal)
For machine-to-machine scenarios, ABP provides ICurrentClient to represent the client identity, but Identity’s user-role assignment logic is still written around user context (ICurrentUser).
A robust workaround is to run the role-assignment part by temporarily switching the current principal to a “system/admin” user (so CurrentUser.Id is not null), using ICurrentPrincipalAccessor.Change(...), then call the base implementation.
Example pattern:
using System.Security.Claims;
using Volo.Abp.Security.Claims;
using Volo.Abp.Users;
// build a principal that includes AbpClaimTypes.UserId for a real user (e.g., admin/system user)
var principal = new ClaimsPrincipal(new ClaimsIdentity(new[]
{
new Claim(AbpClaimTypes.UserId, adminUserId.ToString()),
new Claim(AbpClaimTypes.UserName, "system")
// optionally add role claims if needed by your logic
}));
using (_currentPrincipalAccessor.Change(principal))
{
// call the identity user app service create/update that assigns roles
}
About your workaround (overriding FilterRolesByCurrentUserAsync and returning inputRoleNames when CurrentUser.Id == null)
It will avoid the exception, but it effectively says: “any client_credentials caller that passes your check can assign any roles it wants, regardless of ABP’s filtering model”.
If you keep it, you should at least gate it using the client identity, not heuristics:
ICurrentClient.IsAuthenticated and ICurrentClient.Id (client id claim-based identity)AbpIdentity.Users.Update.ManageRoles) as you already do.In other words, the idea is workable, but it’s application-specific and not something I can call “framework-supported”; it’s a targeted bypass for a framework bug.
Practical safest workaround right now
ICurrentClient (not ICurrentUser).Sources (verified):
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
Yes — this is expected ABP (Identity module) behavior. Even if a user has IdentityPermissions.Users.ManageRoles, ABP additionally prevents privilege escalation: unless the operator is in the built-in admin role, they can only add/remove roles that they already have. That’s why your SuperUser only sees SuperUser in the selector and can only assign that role, while a user in admin can assign any role.
This behavior is not configurable via permissions out of the box. The permission (ManageRoles) only controls whether role changes are processed at all; the “admin can assign any role” rule is an extra security filter.
Recommended approach (without granting admin):
Keep IdentityPermissions.Users.ManageRoles on SuperUser (required to apply RoleNames changes).
Customize the assignable-role pipeline in a way that applies both:
Concretely, implement your own logic to return exactly the allowed roles for SuperUser (e.g., a fixed allow-list or a permission-based allow-list), and also validate/limit incoming RoleNames during create/update so disallowed roles are rejected or removed.
Since the built-in “non-admin can only assign own roles” rule is hard-coded behavior, achieving “SuperUser can assign a specific set of roles” requires customization (typically by overriding/replacing the relevant Identity application service methods and enforcing your own rule consistently for:
GetAssignableRolesAsync (role picker)Sources:
This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.
AbpLicenseCode. A license code generated today should still be accepted by older commercial packages (like 8.1.1) as long as the runtime licensing mechanism can validate it in that environment.abp login” typically appears when the app can’t find a valid runtime license file/session for that machine/environment, even if AbpLicenseCode is set.Do the following (this is the supported/known resolution path for containers & servers):
ABP Commercial licensing behaves differently depending on environment/build configuration. For server/container deployments, Release is the expected mode.
In container env vars, set (example):
ASPNETCORE_ENVIRONMENT=Release
DOTNET_ENVIRONMENT=Release
This exact fix is confirmed by ABP support in a very similar “AbpLicenseCode is set but still asks for abp login” scenario (Azure container): once ASPNETCORE_ENVIRONMENT was set to Release, it worked.
So first, make sure you are not effectively running in Development/Debug in the container.
AbpLicense.bin or ABP CLI login on that machineABP support’s guidance (again confirmed in the same thread) is:
AbpLicense.bin from a machine where you have logged in successfully, orabp login <username> on the server/container environment (so it can create the local license/session file)This is why the message mentions abp login even when AbpLicenseCode exists: in Development/Debug scenarios, ABP may require the local license file/session (AbpLicense.bin) rather than relying only on the code.
Practical container approach (supported conceptually):
abp login ...) and then mount/copy the produced AbpLicense.bin into the container image/runtime (location depends on the user profile inside the container), or login inside the container during build/startup (be careful with secrets).Also note ABP support’s warning: logging in on a different computer can be counted as a new development computer (seat/device implications).
Nothing in the verified sources indicates you need extra module-specific toggles for packages like Volo.Abp.Identity.Pro.* beyond having an active commercial license and a valid runtime validation method for the environment (Release vs Development/Debug, license file/session availability). Most “ABP-LIC-ERROR … need to log in” cases end up being environment/runtime validation (Release vs Debug + AbpLicense.bin/login), not missing module entitlements.
Yes:
AbpLicense.bin approach or abp login on that environment.If you still can’t get it working after switching to Release, that becomes account/license-server-side and should be handled by ABP directly.
AbpLicense.bin or abp login for Debug/Development: https://abp.io/support/questions/9640abp login): https://abp.io/docs/latest/cliThis response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.