How to access file in Azure disk

Nuwan Wickramanayaka 81 Reputation points
2023-03-16T14:57:00.11+00:00

Hi all

In my recent project I am trying to access files using REST API (deploy in app service in same network) and it give 500 error when access the file.

Path which I am trying to access is

\trmfs1.termserv.xyz.com\termserv_apps_cust\pdf_directory\BPX_USREF\12345\test.pdf

It is in Azure disk and It can be accessed using file explorer. My requirement is I need to access same file using a REST API (.NET core).

Seeking your opining's on this

Thanks

Nuwan

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,156 questions
Azure Disk Storage
Azure Disk Storage
A high-performance, durable block storage designed to be used with Azure Virtual Machines and Azure VMware Solution.
571 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,833 questions
{count} votes

1 answer

Sort by: Most helpful
  1. SaiKishor-MSFT 17,181 Reputation points
    2023-03-29T08:15:24.5966667+00:00

    @Nuwan Wickramanayaka Thank you for reaching out to Microsoft Q&A.

    If you are trying to access the file using REST API and you are receiving a 500 error, it could be due to a number of reasons. Some common causes of 500 errors include:

    • Incorrect URL or path
    • Incorrect authentication credentials
    • Incorrect permissions
    • Server-side issues

    To resolve the issue, you need to validate the URL or path, authentication credentials, and permissions. You can also check the server logs for more information about the error.

    To understand your issue better, please provide more details on your setup and any server-side logs for the same. Thank you!

    0 comments No comments