none
I can't access files in the Blob Container from a web app after publishing it RRS feed

  • Question

  • I'm trying to generate a JSON list of files from Azure Storage (Blob Containers) in my web app (Azure functions template). This works when I run it locally in Visual Studio, but as soon as I publish the web app and access it via the azure URL, the same function no longer works. The only thing I get to see is "HTTP ERROR 401".

    I'm using the key from key1.

    I have googled this and tried a number of things:
    - Change access level of the Blob container to "Container"
    - Firewalls and virtual networks -> Allow access from -> "All networks"
    Thursday, November 7, 2019 4:06 PM

All replies

  • @Richard1337 Just for better understanding can you access this blob files in Azure Storage Explorer  and If possible can you share the template? 

    As I understand your getting this error while accessing Azure Blob file May I correct? 

    May I Know when exactly are you getting this error, can you share the screenshot of the error message? 

    If you consistently get 401 unauthorized errors, verify that you have a valid access token.


    Thursday, November 7, 2019 4:29 PM
    Moderator
  • Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.
    Friday, November 8, 2019 7:56 AM
    Moderator
  • Thank you for your reply. Yes I can reach these blobs in Azure Storage Explorer. The function I'd like to invoke can be found here https://amorestapi.azurewebsites.net/api/FileList but the browser returns a "HTTP ERROR 401". However, when I run this code locally through Visual Studio (like http://localhost:7071/api/FileList), the same method suddenly works. 

    Other functions/template that I deployed on Azure do work. Could this have to do with some Azure security setting involving blob access from another Azure resource?


    Friday, November 8, 2019 4:22 PM
  • @Richard1337 Apologies for the delay! Are you able to ping the Storage Account?

    Wednesday, November 13, 2019 1:37 PM
    Moderator
  • Just checking in to see if you have had a chance to see the previous response. Could you share the above required information to understand/investigate this issue further?

    Thursday, November 14, 2019 5:24 PM
    Moderator
  • Just checking in to see if you have had a chance to see the previous response. Could you share the above required information to understand/investigate this issue further?
    Friday, November 15, 2019 5:33 PM
    Moderator
  • Sorry for the late response, there are some other priorities at the moment. I will come back to this thread later. Thanks for the help so far!
    Monday, November 18, 2019 10:07 AM