Starts in:
1 DAY
22 HRS
53 MIN
10 SEC
Starts in:
1 D
22 H
53 M
10 S

Activities of "Mohammad"

Hi Ma.

I was debugging the same. There is a very wierd behaviour with the MultiTenantConnectionStringResolver code.

For 1 request it asks to resolve AbpPermissionManagement, AbpAuditLogging on the 2nd request it Asks to resolve only AbpAuditLogging for the same page request.

I was trying a workaround. where I set a custom name for the tenant connection string. So when the connectionstring is required by the dbcontext it will try to resolve using the MultiTenantConnectionStringResolver.

I have two modules which work on multitenany

  1. ProductManagement
  2. Intelligence

So according the the code behaviour It should try to resolve connection string for ProductManagement and Intelligence. But it only tries to resolve ProductManagement.

This thread also has the same issues https://support.abp.io/QA/Questions/335/Steps-to-create-Single-Deployment---Multiple-Database-Multi-Tenant-Solution

If you can connect to me remotely I can show you the debug.

Thanks

Hi Ma

Can you provide a sample code to acheive this using MultiTenantConnectionStringResolver ?

Thanks

I have checked MultiTenantConnectionStringResolver.

I'll share zoom details on email.

I have disabled AccessTokenTenantResolver and trying to access the application it still cannot determine the tenant connection string from the database.

It only happens when a connection string for a tenant is set in the database.

Can you please do a remote session and check. I have been facing this issue since i upgraded to 4.2.2

Thanks

Hi

The current tenant id is null in MultiTenantConnectionStringResolver even after the custom tenant resolver has executed also it is null when the api is executing.

I am on version 4.2.2

  • Do you mean the ICurrentTenant is changed? Can you confirm? Yes. It shows the proper tenant

  • The connection string of the tenant is not changed based on the connection string set in the database. I am using seperate database per tenant. The connection string is stored in the database for each tenant database. While running the query the connection string is not taken from the database.

E.g The Identity Server Project Has seperate connection strings for each module

"ConnectionStrings": {
    "Default": "Host=xxx.xxx.xxx.xxx;Port=5432;Database=Tenant1;Username=postgres;Password=xxxxxx;",
    "AbpIdentityServer": "Host=xxx.xxx.xxx.xxx;Port=5432;Database=Identity;Username=postgres;Password=xxxxxx;",
    "AbpIdentity": "Host=xxx.xxx.xxx.xxx;Port=5432;Database=Identity;Username=postgres;Password=xxxxxx;",
}

and if I set a Default Connection String for the Tenant in the database (AbpTenantConnectionStrings Table) When I Try to login to this tenant the Identity Server throws errors

Npgsql.PostgresException (0x80004005): 42P01: relation "AbpUsers" does not exist

For some reason the abp tries to find the AbpUsers table in Tenant1 Database Instead of searching for it in Identity Database.

@maliming Thanks. It worked.

I am not able to find AbpClaimsServiceOptions. I am using v4.2.2. Which Package should I use to configure these options?

here is the jwt token. It doesnt contain the custom claim

{
  "nbf": 1618478761,
  "exp": 1650014761,
  "iss": "https://localhost:44374",
  "aud": [
    "ResellerManagementService",
    "ResellerBackendGateway"
  ],
  "client_id": "reseller-management",
  "sub": "39fb4d11-7a81-1199-d025-822914236ebf",
  "auth_time": 1618478759,
  "idp": "local",
  "preferred_username": "admin@zed.com",
  "phone_number_verified": "False",
  "email": "admin@zed.com",
  "email_verified": "False",
  "name": "admin@zed.com",
  "sid": "23DAB653DBF2AE65AD44614FC6B32290",
  "iat": 1618478761,
  "scope": [
    "openid",
    "profile",
    "ResellerBackendGateway",
    "ResellerManagementService"
  ],
  "amr": [
    "pwd"
  ]
}

How can we use the extended property in LINQ to query the database?

Is the migration code generated automatically from the Efcore configuration or we need to manually write the migration code?

I have been following the above approach but the add-migration creates and empty migration file.

Showing 11 to 20 of 48 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06