Open Closed

SaaS MongoDB Multi-Tenancy, Admin account is not exist ! #1749


User avatar
0
yousef.h85@gmail.com created
  • 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)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I will check it out

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    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 , replace options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; to options.TransactionBehavior = UnitOfWorkTransactionBehavior.Enabled;

    2.Open *TenantDatabaseMigrationHandler class, replace _unitOfWorkManager.Begin(requiresNew: true, isTransactional: true) to _unitOfWorkManager.Begin(requiresNew: true, isTransactional: false)

  • User Avatar
    0
    yousef.h85@gmail.com created

    Hi,

    After these changes the App not running on my local MongoDB Server (Community version 5.0.2)

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    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.

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on December 10, 2024, 06:38