Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Bug: When creating new tenant with non-host db #3606


User avatar
0
najeebalmajeedy created

Hello Everyone,

I have created a new tenant and specified a connection string for the new database but I forgot to change the name of the database to be different than the host database. The system accepted this and it seams to overwrite the original host database. After that when I try to login with tenants created in host db I can't.

I think the system should check the connection string and reject it if the database and server are similar to the original host db.


3 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Najeebalmajeedy,

    Thank you for reporting this. Normally there should not be such a problem but we will investigate this. And we will fix if there is a problem.

    Have you tried it in ASP.NET Core version or ASP.NET MVC 5.x ?

    Thanks.

  • User Avatar
    0
    najeebalmajeedy created

    Hi ismcagdas,

    I encountered this in ASP.NET MVC 5.x . I tried again and found that it's working, the only problem is that the tenant is created within the host db not in a separate db, while displayed in admin panel as separate db.

    So again, I think there should be a mechanism to prevent using same host db if the user choose to create tenant in separate db.

    Thank you.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @Najeebalmajeedy,

    I think tenant is displayed as seperate DB because of connection string property is set. Normally, we allow to create multiple tenant's in the same database.

    For example, you have 3 tenants and one of them has big data, so you can create that tenant in one db, and other two in another.

    But, you are right for using default DB's connection string. We can check that and warn user.

    Thanks.