Activities of "PravinRaijade"

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

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

Hi Support,

Facing issues while calling API deployed on remote server from react-native client. After deploying Web Application on remote cloud VM (running Windows Server ), API calls are failing from react native client. However, they are working when called from swagger.

  1. Getting user Token successfully with below code, var token; await axiosInstance({ method: 'POST', url: '/connect/token', headers: {'Content-Type': 'application/x-www-form-urlencoded'}, data: `grant_type=password&scope=${oAuthConfig.scope}&username=${localUserName}&password=${localPassword}&client_id=${oAuthConfig.clientId}&client_secret=${oAuthConfig.clientSecret}&__tenant=${localTenantId}`, baseURL: oAuthConfig.issuer, }) .then(({data}) => { token = data; console.log('Token from Get Tenant ID Success'); }) .catch(error => { console.log('token from get Tenant Id failed'); Alert.alert('Error', 'Getting Token Failed for Tenant-Id '); });

  2. Below request to get Tenant by name failing,

await axiosInstance({ method: 'GET', baseURL: oAuthConfig.issuer, url: `/api/abp/multi-tenancy/tenants/by-name/${localTenantName}`, headers: { 'Content-Type': 'application/json', __tenant: `${localTenantId}`, Authorization: `${token.token_type} ${token.access_token}`, }, })

localTenantId is '' (null) for host.

Note: a) It works when running on local machine with IIS express in development environment. Mobile App is able to call API successfully.

Appreciate quick turnaround. we have demo to senior management.

Regards, Pravin Raijade.

I closed the ticket after writing my comments. so, that could be the reason, you missed my request for refund of credit.

My request is, am I eligible for refund of credit as I resolved this issue at my level. if yes, could you please do the needful.

Regards, Pravin Raijade.

HI Support,

I could resolve the issue at my level.

I was assuming that when we switch the Tenant using, "CurrentTenant.Change" and insert new record in tenant DB, the Guid of the record would be same as that of the host record before switch. (these master records and not host & tenant specific). This is more relevant when we have linked table using foreign key referential integrity. But, that assumption was wrong. Now, I am querying the Guid of linked table record (foreign table) from respective tenant DB and updating master record with appropriate Guid of child record and then calling "CreateAsync"

If possible, could you please refund the credit points.

Regards, Pravin Raijade.

  • ABP Framework version: v4.3.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
  • Login as Host (tenantID = null)
  • create record for a table using generated Form.
  • in method = public async Task<IActionResult> OnPostAsync() added following code so that Table in Host DB and same table in Tenant DB should get updated.

using (CurrentTenant.Change(tenantId))
{ Guid tmp = CurrentTenant.GetId(); // this line is just to check whether tenant switched properly

          await _XXXXAppService.CreateAsync(MyEntityDto);
          return NoContent();
       }

getting correct tenant ID in using statement.

Note : I am using separate DB per tenant. appreciate your help.

Getting following error :

Failed to load resource: the server responded with a status of 500 () [https://192.168.254.51:44346/XXXXs/CreateModal]

Remember, I have separate DB per Tenant.

Need solution on URGENT basis.

Appreciate your help.

But none of the following API accept TenantID/ Tenant Name

GET /api/identity/users/{id}

PUT /api/identity/users/{id}

POST /api/identity/users/{id}

I want to authenticate the mobile User using "User Name & Password" and based on the Role of the logged in User, decide on the mobile application workflow.

how can I change the Tenant using Mobile App? is there any API available out-of-the-box?

hi

Usually, you can use ICurrentTenant to get current tenant info, if your API needs to control it, you can pass tenantId to your API.

https://docs.abp.io/en/abp/latest/Multi-Tenancy#icurrenttenant https://docs.abp.io/en/abp/latest/Multi-Tenancy#change-the-current-tenant

Hi Support,

But none of the following API accept TenantID/ Tenant Name

GET /api/identity/users/{id}

PUT /api/identity/users/{id}

POST /api/identity/users/{id}

I want to authenticate the mobile User using "User Name & Password" and based on the Role of the logged in User, decide on the mobile application workflow.

how can I change the Tenant using Mobile App? is there any API available out-of-the-box?

  • ABP Framework version: v4.4.3
  • UI type: MVC
  • DB provider: EF Core (separate DB per Tenant)
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi Support,

I am developing mobile app using react native and wants to connect to Tenant DB (separate DB per Tenant) and get given Users Roles details. But, I don't see API accepting Tenant Identification. This is little urgent. Please help.

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