I found the solution. Thanks though :)
For anyone else having this issue, I recommend: https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy
The section "Switching Between Hosts and Tenants"
When I'm making calls to a respository from a background job, the tenantId is always null. I've tried including the tenantId in the where clause
e.g. _roleRepository.GetAll().Where(r => r.TenantId == args.TenantId);
My understanding though, is that this where is considered after abp has already filtered the data on the tenantId. Therefore, it will never find anything as all the data it's searching will have a tenantId of null.
Is there a way I can set the tenantId the repositories are using within the background job class itself?
Thanks in advance.
We are using app services.
How can we access this through Azure though? As mentioned, we are only having the above (non-issue) locally. It is when we deploy to Azure we are getting the "Internal Server Error".
I've checked what files I can access using Kudu and I've been unable to find the above file anywhere.
Hi maliming,
I've checked every log I can and I can't find any more information on the error. Whereabout are the application logs located you're referring to?
The system was not picking the tenant id when downloading was performed from tenant side.
It works fine on the host side but when logged in as a tenant it gives 404.
Great, thanks.