- ABP Framework version: v4.4.0
- UI type: MVC
- DB provider: MongoDB
- Tiered (MVC) or Identity Server Separated (Angular): NA
- Exception message and stack trace:
- Steps to reproduce the issue:" Create a new Tenant
Dear Sir
When we create a new tenant from the host dashboard the main Admin user for this tenant is not created and we can not log in, please see screenshots:
5 Answer(s)
-
0
Hi,
I will check it out
-
0
Hi,
ABP use transactions to handle migrations, you need to enable transactions for mongodb server for complex operations.
There are two ways:
1 Enabled transcation for mongodb server, Open
MongoDbModule
, replaceoptions.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled;
tooptions.TransactionBehavior = UnitOfWorkTransactionBehavior.Enabled;
2.Open
*TenantDatabaseMigrationHandler
class, replace_unitOfWorkManager.Begin(requiresNew: true, isTransactional: true)
to_unitOfWorkManager.Begin(requiresNew: true, isTransactional: false)
-
0
-
0
Hi,
Sorry, I said is not very clear, that are two different solutions.
The first solution, you need to make sure the mongodb server support transcations.
the second solution is delete the code that uses the unit of work.
-
0
This question has been automatically marked as stale because it has not had recent activity.