Checklist to identify and fix:
If you need to ensure the local form always appears for troubleshooting, you can temporarily override the login page as documented and explicitly render the form when you know it should be visible.
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.
Example for Account Pro (Public + Admin Web) on v9.3.6:
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc; // for AddApplicationPartIfNotExists
using Volo.Abp.Modularity;
using Volo.Abp.Account.Pro.Public.Web;
using Volo.Abp.Account.Pro.Admin.Web;
[DependsOn(
typeof(AccountPublicWebModule),
typeof(AccountAdminWebModule)
)]
public class MyProjectWebModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
// Ensure MVC can discover Razor Pages/Views/Controllers from the module source projects
context.Services
.AddMvc()
.AddApplicationPartIfNotExists(typeof(AccountPublicWebModule).Assembly)
.AddApplicationPartIfNotExists(typeof(AccountAdminWebModule).Assembly);
// If you also have HttpApi Controllers from module source, keep conventional controllers:
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(MyProjectWebModule).Assembly);
});
}
}
Notes:
If your host only uses the Public Web part, you can omit the Admin one and keep only AccountPublicWebModule’s assembly in AddApplicationPartIfNotExists.
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.
Apply and verify these steps in your Web project that hosts the UI (the one that serves /Account/Login):
A) Ensure the required middleware order in Configure pipeline In your Web host (e.g., MyProject.Web), Configure method must include, in this order:
A missing UseAuthentication/UseAuthorization or UseConfiguredEndpoints will result in POST not reaching the Razor Page handler.
B) Add MVC Application Parts for module source projects When you included Account.Pro source, ensure MVC discovers its pages/controllers:
public override void ConfigureServices(ServiceConfigurationContext context) { Configure<AbpAspNetCoreMvcOptions>(options => { options.ConventionalControllers.Create(typeof(MyProjectWebModule).Assembly); });
// Ensure MVC can locate Razor Pages/Views from module projects
context.Services.AddMvc()
.AddApplicationPartIfNotExists(typeof(Volo.Abp.Account.Pro.Public.Web.AccountPublicWebModule).Assembly)
.AddApplicationPartIfNotExists(typeof(Volo.Abp.Account.Pro.Admin.Web.AccountAdminWebModule).Assembly)
.AddControllersAsServices();
}
If your module class names differ (due to namespace), add the corresponding Public.Web/Admin.Web assemblies from the Account.Pro source you added. Without these ApplicationParts, routing/view discovery can fail and the POST handler might not be mapped.
C) Verify authentication schemes after source inclusion Account.Pro’s login relies on Identity cookie scheme for local login and IdentityConstants.ExternalScheme for external flows. Ensure you didn’t inadvertently override DefaultScheme/DefaultChallengeScheme in your host. A safe configuration:
public override void ConfigureServices(ServiceConfigurationContext context) { Configure<AuthenticationOptions>(options => { // Do not set DefaultChallengeScheme to OIDC for the whole app unless you know why. // Let AccountPro render external providers and challenge only when selected. });
context.Services.AddAuthentication(); // keep defaults from ABP/Identity
}
If you integrate an external provider (OIDC, Azure AD), register it but don’t globally set DefaultChallengeScheme. For OIDC, make sure SignInScheme is IdentityConstants.ExternalScheme:
context.Services.AddAuthentication() .AddOpenIdConnect("oidc", options => { // ... your authority, client id/secret, scopes options.SignInScheme = Microsoft.AspNetCore.Identity.IdentityConstants.ExternalScheme; });
D) Confirm the Razor Page form posts antiforgery
E) Check endpoint mapping for Razor Pages If you customized endpoint registration, ensure MapAbpEndpoints (or UseConfiguredEndpoints) is called. If you use endpoint routing explicitly, make sure you have endpoints.MapRazorPages(); or the ABP equivalent.
F) Clear caches and recompile
G) Quick diagnostics
If you also enabled “External Logins” using Account Pro settings and you recently upgraded, and you still get silent redirects, check your AbpUserLogins table for duplicated or stale IdentityUserLogin entries. Clearing conflicting entries fixed a similar issue after upgrades in another case.
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.
You do not need a custom IAuditingStore just because you want to persist audit logs into a different SQL Server database. ABP’s EF Core integration already supports multiple databases and separate DbContexts per module.
Recommended approach (ABP 9.1.1):
[DependsOn(
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule) // important
)]
public class YourAppEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpDbContextOptions>(options =>
{
// Default DB for your main DbContext(s)
options.Configure<YourAppDbContext>(c => c.UseSqlServer());
// Configure the audit logging DbContext to use a different connection string
options.Configure<AbpAuditLoggingDbContext>(c =>
{
c.UseSqlServer();
});
// Fallback provider if needed
options.UseSqlServer();
});
// Map connection strings by name (Default vs. AuditLogging)
// appsettings.json:
// "ConnectionStrings": {
// "Default": "Server=...;Database=MainDb;...",
// "AuditLogging": "Server=...;Database=AuditDb;..."
// }
Configure<AbpDbConnectionOptions>(opt =>
{
// Tell ABP to use "AuditLogging" connection for AbpAuditLoggingDbContext
opt.Databases.Configure("AuditLogging", database =>
{
database.MappedConnections.Add(typeof(AbpAuditLoggingDbContext));
});
});
}
}
{
"ConnectionStrings": {
"Default": "Server=.;Database=MainDb;Trusted_Connection=True;",
"AuditLogging": "Server=.;Database=AuditDb;Trusted_Connection=True;"
}
}
Configure<AbpAuditingOptions>(options =>
{
options.IsEnabled = true;
options.EntityHistorySelectors.AddAllEntities();
// etc.
});
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
app.UseAuditing(); // required
}
Why no custom IAuditingStore is required:
Optional: schema customization
AbpAuditLoggingDbProperties.DbSchema = "audit";
Ensure your migrations align with the chosen schema.
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.
What happened
Fix it step by step
Reproduce the exact migration command locally to see the full error
If you keep two DbContext model-creating extension classes, merge into one
Validate the entity property types and constraints
Ensure references used by dotnet ef build are correct
If you want to generate without DB migration to proceed
After you can run dotnet ef successfully
Notes aligning with ABP conventions
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 is a known naming quirk in some ABP CLI template versions where the generated Blazor Server project omits the dot between the solution name and the “Blazor*” suffix for a few files. It does not affect runtime, but you can safely fix the names to match the namespace and other files.
Recommended fix (one-time, manual rename):
If you prefer to regenerate:
After renaming:
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.
Root cause: In the MVC Book Store sample, the New Book button uses ABP’s ModalManager and generated JavaScript proxies. If the global proxy namespace isn’t initialized on the page, clicking “New book” won’t do anything. On some setups (often Linux or when script order/bundling differs), the proxy object path can be undefined, so the button appears but the click handler silently fails.
Quick fix in Pages/Books/Index.js:
Ensure the page includes the generated JS proxies before Index.js:
Verify bundling isn’t stripping or reordering required scripts:
Double-check the selector and click handler wiring:
If the modal still doesn’t open:
Note on OS differences (Linux vs Windows):
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.
Why the markup looks different
Get the correct, up-to-date view for Account Pro
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling
6) Keep the original model type from the Pro page (don’t switch to the free module’s LoginModel). If you need to extend behavior, subclass the correct Pro LoginModel type and only change the @model accordingly.
7) Now, minimally customize only the external login section:
- Find the external login block:
- The form with asp-page="./Login" asp-page-handler="ExternalLogin" (or a dedicated partial used for external providers).
- Insert your small changes (e.g., button text, icon, order), leaving all other markup intact to preserve styling.
If you only want to inject buttons without copying the whole page
LeptonX/LeptonXLite account layout note
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.
Apply the following steps to make your integration tests deterministic and fix the failure:
public class SiteManagementDataSeedContributor : IDataSeedContributor, ITransientDependency
{
private readonly IUnitOfWorkManager _uowManager;
private readonly IRepository<Contact, Guid> _contactRepository; // example
private readonly ICurrentTenant _currentTenant;
public SiteManagementDataSeedContributor(
IUnitOfWorkManager uowManager,
IRepository<Contact, Guid> contactRepository,
ICurrentTenant currentTenant)
{
_uowManager = uowManager;
_contactRepository = contactRepository;
_currentTenant = currentTenant;
}
public async Task SeedAsync(DataSeedContext context)
{
// Avoid host-only seeding when you expect tenant-only data
// and/or ensure you seed for a specific tenant
using (_currentTenant.Change(context?.TenantId))
{
using (var uow = _uowManager.Begin(requiresNew: true))
{
// Defensive checks to prevent NREs
if (_contactRepository == null)
{
await uow.CompleteAsync();
return;
}
// Example: skip if already seeded
var count = await _contactRepository.GetCountAsync();
if (count == 0)
{
await _contactRepository.InsertAsync(new Contact(/* init fields */), autoSave: true);
// ... add more seed data
}
await uow.CompleteAsync();
}
}
}
}
public class SiteManagementTestBaseModule : AbpModule
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
SeedTestData(context);
}
private static void SeedTestData(ApplicationInitializationContext context)
{
AsyncHelper.RunSync(async () =>
{
using var scope = context.ServiceProvider.CreateScope();
var dataSeeder = scope.ServiceProvider.GetRequiredService<IDataSeeder>();
// Optionally seed for host or a specific test tenant
await dataSeeder.SeedAsync(new DataSeedContext(/* tenantId: null or a tenant Guid */));
});
}
}
public class Contact : AggregateRoot<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
// other properties...
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpUnitOfWorkDefaultOptions>(options =>
{
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
});
context.Services.AddAlwaysDisableUnitOfWorkTransaction();
Configure<FeatureManagementOptions>(options =>
{
options.SaveStaticFeaturesToDatabase = false;
options.IsDynamicFeatureStoreEnabled = false;
});
Configure<PermissionManagementOptions>(options =>
{
options.SaveStaticPermissionsToDatabase = false;
options.IsDynamicPermissionStoreEnabled = false;
});
}
Keep test seeding minimal and deterministic
If you need tenant data during test, explicitly seed for that tenant
var tenantId = /* known test tenant Guid */;
await dataSeeder.SeedAsync(new DataSeedContext(tenantId));
These practices address:
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.