locked
Azure App Service & Storage RRS feed

  • Question

  • Hi Guys,

    We're using the Azure App Service for a project but i'm after some advice on the best way to manage additional storage requirements.

    The "Standard" App Services only come with 50GB Storage and our application has some large image libraries (JPG/PNG's stored on disk).

    I've created an Azure Storage Account and a File Share within this.

    So whats the best way for us to actually use these image files within the app (mostly product photos being rendered to the users browser).

    Should we be using the .NET Azure Storage Client Library / Wrapper for the REST API or should we use the HTTP link directly into the Storage Account File Share?

    https://storageaccountname.file.core.windows.net/FileShareName/FolderName/FileName.jpg

    If its best to use the HTTP link, how do you setup the security to allow public access to folders/file shares (if thats even possible)?

    We've also got some Azure VM's that will need to access the file share but that looks like it can be easily achieved via SMB.

    Thanks

    Chris

    Tuesday, June 7, 2016 7:03 AM

All replies

  • Hello Chris,

    Thank you for posting your question on Microsoft TechNet.

    Microsoft Azure Storage Documentation :

    https://azure.microsoft.com/en-us/documentation/services/storage/

    Azure File Service REST Operations :

    https://msdn.microsoft.com/library/dn167006.aspx

    When you go to App Services Premium (Preview) you will get 500GB of Storage :

    https://azure.microsoft.com/en-us/documentation/articles/azure-subscription-service-limits/#storage-limits

    Hope this information is useful for you.

    Best Regards,

    @Jamesvandenberg

    -----------------------------------------------------------
    (If this information is helpful, Please mark your question as answered for the community.)

    Tuesday, June 7, 2016 7:24 AM
  • H James,

    Thanks for the quick reply but i'm not sure the documents really answer my questions.

    I know the Premium App Services comes with 500gb but that also comes at a cost and we may potentially need more than 500gb storage for some asset files.

    Let me word the question in a different way ...

    From a best practices / architectural perspective, if we have an App Service linked to a File Storage Account hosting product photos being rendered to a users screen , are we best to use the REST API or directly reference the files via their HTTP link, eg

    https://storageaccountname.file.core.windows.net/FileShareName/FolderName/FileName.jpg 

    Thanks

    Chris

    Thursday, June 9, 2016 4:32 AM
  • Chris, if you are a developer writing an app service, then you are best served leveraging either the REST API or the Storage client libraries that are available in .Net, Java, Node.js and a bunch of other languages. These provide features such as Shared Access Signatures, for managing fine tuned access control to your files if you want to access them via REST. Using the client libraries will provide capabilities like exponential backoff in case of transient failures and connection management for fast upload/downloads.

    https://azure.microsoft.com/en-us/documentation/articles/storage-dotnet-how-to-use-files/ should hopefully give you more tips.

    Hope that helps. 

    Dinesh

    Thursday, June 9, 2016 8:01 AM
  • Hi Dinesh,

    We have setup a demo using the Azure Storage Client Libraries for .NET but this doesn't appear to solve our problem.

    I still can't see any way to allow anonymous HTTP/HTTPS access to the URL of a file within the storage account.

    It appears the only way this can be achieved is via BLOB storage ... is this correct? 

    Thanks

    Chris

    Tuesday, June 21, 2016 10:43 PM
  • Hi Chris,

    You can't allow anonymous HTTP/HTTPS access to a file on an Azure File Share; you have to use a Shared Access Signature. However, you can allow anonymous access to a file in Blob storage. If I were you, I'd put the files in Blob storage, choose the access setting to 'blob' (blob is public, container is private), and use the URLs to the blobs.

    You can actually host an entire static website in blob storage.

    It's good to put your static images, videos, etc., in blob storage and point to them from your web app. If you do that, then the work of serving up those resources is handled by the storage service rather than the web service, freeing up the web service to focus on its other business.

    Robin


    Sr. Content Developer at Microsoft

    Thursday, June 30, 2016 7:28 PM

  • https://storageaccountname.file.core.windows.net/FileShareName/FolderName/FileName.jpg

    If its best to use the HTTP link, how do you setup the security to allow public access to folders/file shares (if thats even possible)?


    You can use Shared Access Signatures.

    Best Regards,
    Carlos Sardo

    Friday, July 1, 2016 9:04 AM