- 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
-
0
hi
Please share all
logs.txt(all microserves)
to liming.ma@volosoft.comThanks.
-
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
-
0
-
0
-
0
hi
- Try to change to
TrustServerCertificate=True
- Try to use
Encrypt=False
https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-7.0/breaking-changes?tabs=v7#mitigations
- Try to change to
-
0
-
0
hi
You need
Test
your connection string first.xxxx.;Database=Tenant-A; TrustServerCertificate=True
OR
xxxx.;Database=Tenant-A; Encrypt=False
-
0
-
0
ok, I will do some checks and reply to you soon.
Thanks
-
0
-
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?
https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/ConnectionStrings/SqlServerConnectionStringChecker.cs#L10
Test button also use it to check the connection string.
-
0
-
0
hi
Can you try connecting with a different SQL server database?
Maybe the DB has a problem.
Thanks
-
0
-
0
hi
Can you create a new SQL server container and test it?
https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-docker?view=sql-server-ver16&tabs=cli&pivots=cs1-bash#run-the-container-2
-
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.