Activities of "MarekH"

  • ABP Framework version: v4.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace: Unable to access the action method which is used to switch tenant and get users list of that tenant
  • Steps to reproduce the issue: We have a Microservice project in our solution from which we are trying to connect the database of tenant by providing tenant Id to insert or update any data of particular tenant from the tenant database.
  • We created a controller inside that microservice project and trying to change the tenant using dbcontext but we are not able to call that method. after adding such reference of entityframeworkCore project
  • We have created a question related to that and we got that question credited back by team.
  • We are sharing Demo Project link and screen shot here in which are are trying to access the tenant database.
  • Demo Project Link : https://drive.google.com/file/d/1RZUKdUTNM7Az8t_IRr0i1oF_nVvVb17q/view?usp=sharing
Question
  • ABP Framework version: v4.3.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hello, we are trying to resolve issues related to switching between host and customer DBs.

Our purpose :- Insert,Update and Get data as per the connectionString of tenant from Host layer API as well as from newly created Microservice layer API

I was trying to switch the database using connection string So I added one method ContextFactory in DbContext.cs file(EntityFrameworkCore layer)

Create a sample API in Demo.HttpApi.Host layer and Call the ContextFactory method which returns a given connectionString context object.

Using that object i am able to access all the tables but getting error 'Object reference not set to an instance of an object'

My question is:how can we change the context and get the data from Host layer API as well as Microservice API ?

ABP Framework version: v4.2.0 UI type: Angular DB provider: EF Core Tiered (MVC) or Identity Server Separated (Angular): yes Exception message and stack trace: Steps to reproduce the issue:

Hello, we are trying to resolve issue related to switching between host and customer DBs..

Our solution is deployed with host DB and separated Identity Server (IS) (running as separate microservice and using host DB). We would like to use Multi-tenant solution with separate DB for each tenant. We are trying to use centralized IS to handle all requests. We already created our custom override of CreateAsync method in TenantAppService to create some custom actions during tenant creation (tenant DB creation, running some seed methods, etc.). UpdateDefaultConnectionStringAsync is called too in our method to update SaasTenantConnectionStrings table in host DB.

So when we create new tenant from host app, there is a new tenant DB, SaasTenantConnectionStrings table in host DB contains correct connection string too. We have also a wildcard rule in IdentityServerClientRedirectUris table in IS.

When we access https://tenant1.ourappurl/ and click Login, we are redirected to the correct IS page with login. My question is: Can we identify the tenant using the domain resolver to direct to the tenant db once the authorization is completed on the centralised IS server?

Thanks a lot!

Showing 1 to 3 of 3 entries
Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11