Error 404 on Download using ASP.NET MVC Azure File Provider

I'm experiencing a 404 not found error using the ASP.NET MVC Azure File Provider when trying to download an file from the azure blob storage container that I've linked to the file provider. The issue occurs due to the deserialised json not including the root directory as part of the argument path. Screenshots as follows: 


The DownloadAsync method does not include the correct filepath as it should be "https://deetusegro.blob.core.windows.net/emg/emg/TestTest Test.txt" as shown in the next screenshot: 
I've traced the issue up to the method that gets called from the API - AzureproviderController line 89 

The reference to the args.Path used in the download function does not include the root directory leading me to believe this is most likely an issue with the node package not including the root directory as part of the file path that is sent to the file provider as JSON. Are there any potential fixes for this as with the source control I'm using and since the node modules directory is approximately 200MB I cannot push any changes to my git repository and expect it to work fine on one of my colleagues versions without telling them of this issue.

EDIT
I've added in the second emg to the URL but unfortunately comes back with a 404 response still. I split the request from the DownloadAsync function into 4 lines as follows:

And it seems to be that calling WebClient().DownloadData() causes the 404, is there any reports of this type of bug?.

2 Replies

AR Adam Ratcliffe June 3, 2020 09:44 AM UTC

We discovered part of the issue was that the azure settings were not set correctly to allow for this type of download. However, this means that the access to the azure files is not secure, we have tried to append a Shared Access Signature to the end of the URL only for it to return as a 403 error instead, is there a way to set up azure and the file provider so that the files are still secure and we can access them via the file provider?

The file provider needs the key of the azure blob storage in order to authenticate the access, and it doesn't seem to be used in the file provider we've been using, is this intentional or is there a missing section of code that is meant to include this?


SP Sowmiya Padmanaban Syncfusion Team June 3, 2020 01:58 PM UTC

Hi Adam,  
  
We have checked your requirement with FileManager component. Currently, we have provided support only for accessing the files by setting the Azure blob as public. We have not provided support for shared key access in Azure Blob storage. We consider this as a improvement feature from our end. It will be included in any one of our upcoming release. Generally, we will plan feature based on customer count, feature request and whilist plan. 
  
Track the below link to know the feature status. 
  
We appreciate your patience. 
  
Regards,  
Sowmiya.P 


Loader.
Up arrow icon