Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Tenant Id not found for APIs like DownloadBinaryFile or GetProfilePictureByUser #11565


User avatar
0
csona created

ASP.Net Zero Version: v10.2 ASP.Net Core + Angular

Hello,

While trying to use 'Download collected data' feature, the DownloadBinaryFile API fails since the Tenant Id is not found. SImilary in some cases User Pictures are not visible since GetProfilePictureByUser API fails due to Tenant Id not found issue. For these APIs, there is no Authorization attribute or AbpAllowAnonymous attribute. Could this be the reason regarding Tenant Id not being found? If so, what kind of changes do we need to make it work?

Thanks in advance.


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @csona

    The TenantId is sent automatically using Angular interceptors via reqeust headers and multi tenant records are filtered automatically. Do you have this problem out of the box or do you call those endpoints from an external app ?

  • User Avatar
    0
    csona created

    Hi @ismcagdas

    Yes, the problem occurs out of the box. The APIs are called by the Angular front end on Administration -> Users page and {User Space} -> Download Collected Data option. Both APIs are called from Angular after the Tenant User has logged into the application.

    Please find attached the screenshot deomonstrating first case.

    For second case, the file does not download but the Notification system is updated with an entry to download the file later. If the User clicks on the link in the Notification, the application gets redirected to the Back end application URL and the file does not download.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @csona

    Is your app live ? If so, is it possible to access it with a test account ? If it is live, please share the test credentials with [email protected].

    If this happens locally, send an email to [email protected] and we will check this problem with a remote connection.

    Thanks,

  • User Avatar
    0
    csona created

    Hi @ismcagdas

    Sorry for the delay in replying. The app is live at followng URL - https://app.growthplan.net

    I have sent the test credentials at [email protected]

    Please let me know if you need further information.

    Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @csona

    Thanks, replied to your email. We can continue via email for this problem.

  • User Avatar
    0
    csona created

    Hi @ismcagdas

    I have sent the Web.Host project over email a dew days ago as requested. Do you have any update regarding the issue or possible changes to be done at my side.

    Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @csona

    Sorry for the late reply. We requested the full project source code to reproduce the problem.