-
ABP Framework version: v8.3.0
-
UI Type: Angular
-
Database System: EF Core (SQL Server)
-
Tiered (for MVC) or Auth Server Separated (for Angular): yes
-
Exception message and full stack trace:
-
Steps to reproduce the issue: Create a microservice startup template using ABP studio and create a new tenant with module specified connection string(please refer screenshot below). Click on Run > Build & Start All to run all the solutions using ABP studio.
Hi, I have encountered some problems when trying login to the tenant that created. I have consolidated some of the problems at below.
-
Notice that, some identity related tables are not being generated in tenant database.(E.g AbpUser table). I have tried manually apply the migration by clicking "Apply database migrations" button on the UI, but the missing tables still not being generated.
-
Notice that, login with this tenant option is missing in the Host UI.
-
Encountered "Invalid object name "AbpLanguageTexts" error when login to new created tenant . I have checked the **AbpLanguageTexts **table is existed in tenant administrator database.
Your advice would be greatly appreciated. Thank You.
37 Answer(s)
-
0
hi
Notice that, some identity related tables are not being generated in tenant database.(E.g AbpUser table). I have tried manually apply the migration by clicking "Apply database migrations" button on the UI, but the missing tables still not being generated.
Please check the logs.txt files. There may be errors.
-
0
Hi,
I found there is no errors inside the log files. Based on the saas log file, it seems executed the tenant migration without any errors. However, the tenant database not reflected. I have tried to clear up redis cache as well. Do you mind share me your email, so that I can share you my solution?
-
0
-
0
hi
The migration error logs:
[ERR] A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) Microsoft.Data.SqlClient.SqlException (0x80131904): A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) System.ComponentModel.Win32Exception (0x80090325): The certificate chain was issued by an authority that is not trusted.
-
0
Do you have
TrustServerCertificate=True
in your connection string? -
0
Hi,
Yes, I already added TrustServerCertificate=True in my tenant connection string previously.
,
-
0
hi
What happens if you click the Test button?
-
0
Hi,
It shows invalid connection string. However, the connection strings for Administration and AuditLog both are also showing invalid connection strings(same with tenant, just the database name different) but somehow both were able to generate the database schema.
-
0
hi
-
Try to change to
TrustServerCertificate=True
-
Try to use
Encrypt=False
-
-
0
Hi,
I have added Encrypt=False inside tenant connection string and manually apply migration. It seems like does not reflect to tenant database.
-
0
hi
You need
Test
your connection string first.xxxx.;Database=Tenant-A; TrustServerCertificate=True
OR
xxxx.;Database=Tenant-A; Encrypt=False
-
0
Hi,
Both ways were showing invalid connection string.
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Tenant-A;TrustServerCertificate=true
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Tenant-A;Encrypt=False
-
0
ok, I will do some checks and reply to you soon.
Thanks
-
0
hi
Maybe your database has a problem. I have tested it, and it works.
-
0
Hi,
I have checked and confirmed the connection string below is accessible by SQL SSMS.
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Tenant-A; TrustServerCertificate=true
I have tried to call the check connection API by passing above connection string as input parameter, but unfortunately is was returning False. Seem like could not find any hints from saas log file.
Would you advise is there any configuration that I have possible missed out? Do you mind to remote my PC to check?
-
0
hi
Can you use this class to test your connection strings?
Test button also use it to check the connection string.
-
0
Hi, I have tried both connection strings below. Both were returned result as false.
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Tenant-A; TrustServerCertificate=true
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=Tenant-A;Encrypt=False
-
0
hi
Can you try connecting with a different SQL server database?
Maybe the DB has a problem.
Thanks
-
0
Hi, I have manually created a TestDB. Seem like still returned false.
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=TestDB; TrustServerCertificate=true
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=TestDB;Encrypt=False
-
0
hi
Can you create a new SQL server container and test it?
-
0
Hi, I have pulled the latest sql-server 2022 and run in container(Docker Desktop).Still having the same problem.
Docker command
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=myPassw@rd" -p 1434:1433 --name sql1 --hostname sql1 -d mcr.microsoft.com/mssql/server:2022-latest
Connection Strings
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=TestDB; TrustServerCertificate=true
Server=localhost,1434; User Id=sa; Password=myPassw@rd; Database=TestDB;Encrypt=False
-
0
hi
Can you join the zoom and share your screen?
https://us05web.zoom.us/j/83082142414?pwd=qbXdOEBKIFxbgxaPgpXnF4uNN2Jx4Y.1
-
0
hi
I will find a solution soon.
Thanks.
-
0
hi
I have confirmed: Currently ms doesn't support the one(default) database for microservice projects,
You need to specify different connection strings for all modules.Add
AbpIdentity
andAbpOpenIddict
inservices\saas\MyTest.SaasService\MyTestSaasServiceModule.cs
options.Databases.Configure("Identity", database => { database.MappedConnections.Add("AbpIdentity"); database.MappedConnections.Add("AbpOpenIddict"); });
-
0
Hi, I have manually applied the code that you mentioned to
services\saas\AbpMultiTenant.SaasService\AbpMultiTenantSaasServiceModule
It provides the option to set connection string for Identity module.However, still encountered invalid connection string issue when click on Test connection string. And also encountered Invalid object name AbpLanguageTexts error when trying login with the new tenant i have created. I have checked AbpLanguageTexts table is existed in my tenant administrator database. Would like to get advise from you.