14

I just read an article about Windows Azure Web Site and would like to evaluate this service. My company just developed an ASP.NET MVC based website that enables our customers to download files we provide as well as upload files.

Both works based on URLs that we send. The workflow is easy: 1. We login to our website, upload a file and retrieve a link generated by the site 2. We send the link to the customer by e-mail 3. The customer can use this link without the need to authenticate and easily download the file.

Or 1. We login to out website and retrieve an upload link generated by the site 2. We send the link to the customer by e-mail 3. The customer can use this link without the need to authenticate and easily upload a file.

We are currently hosting this website locally in our own infrastructure. The Website is used rarely and the files are not that big. We are storing them simply on our fileserver.

I would like to find out how to host this website on WAWS and the first question I have is: What options do I have for actually storing the files? Second: Our website sends notification e-mails to us internally when a customer downloaded or uploaded a file. Is this possible with WAWS?

Luke Girvin
  • 13,221
  • 9
  • 64
  • 84
Mephisztoe
  • 3,276
  • 7
  • 34
  • 48

2 Answers2

26

If you want to persist files in Windows Azure (Web Sites) you should use Blob Storage. Features that you might like:

  • All files uploaded here get an URL like this: http://myaccount.blob.core.windows.net/somecontainer/somefile.txt
  • You can use a custom CNAME to get http://files.mycompany.com/somecontainer/somefile.txt
  • You can apply security to blobs through shared access signatures
  • Blob storage is very cheap
  • Every blob is replicated across three computers in a Windows Azure datacenter. Writing to a blob updates all three copies, so later reads won’t see inconsistent results.
  • Geo-replication replicates your Windows Azure Blob and Table data between two locations that are hundreds of miles apart and within the same region (i.e., between North Central and South Central US, between North Europe and Europe West, and between East and South East Asia).
  • Limited to 100TB per storage account

Sending emails on the other hand is not possible with Windows Azure. You'll need to do this through a third party. I personally use Amazon SES but SendGrid is also a good option since they have a special offering for Azure users.

Fernando Correia
  • 21,803
  • 13
  • 83
  • 116
Sandrino Di Mattia
  • 24,739
  • 2
  • 60
  • 65
  • 2
    I am curious if there is any kind of synchronization/storage management/replication between multi-instance shared or reserved sites or if blob store is really the only way to go with e.g. CMS-uploaded images. – Simon Opelt Sep 25 '12 at 12:38
  • @SimonOpelt - I believe that Azure Web Sites shares the filesystem across all instances (e.g., 5 VMs) of the same deployment (where the filesystem is backed by blob storage behind the scenes). If true, always-in-sync would be the case automatically. – codingoutloud Apr 21 '14 at 14:24
  • But then i do i configura the wordpress website, to when i upload images there ( on wordpress) they go to the storage blob and not the local server? i dont understand that part. Because i have a webapp running wordpress, and im limited to 10G and i need more! – Miguel Dec 26 '15 at 13:28
  • Sendgrid offering is still available on Azure as of 2019. – weaveoftheride Jun 23 '19 at 20:43
  • If you did write the files to the Azure App Service, and were only using a single instance would you be at risk of losing those files? I'm wondering about how does Azure migrate your deployed files between data centres if it needs to - Will it move all files includes those created after deployment? (If you scaled out rather than up you'd definitely get issues if your code wasn't storing and this answer is 100% the right way to go to avoid any issues) – Dan Harris Oct 20 '20 at 14:10
0

I recently was using Azure web app to show a client how the development was going. In my scenario, when in production it would execute in a dedicated server with access to the file system so I could not use Azure Blob Storage. The bright side is that Azure Web Apps come along with storage (whose size will depend of the tier the app is in), you can access it through D:\home\site"your path", that storage is explained here. You can access them by FTP (explained here).

Uwe Keim
  • 39,551
  • 56
  • 175
  • 291
user3130628
  • 497
  • 4
  • 5
  • It looks like when you store files in the apps local folder on the D:\ drive the files ARE shared between all instances: https://learn.microsoft.com/en-gb/azure/app-service/operating-system-functionality#file-access-across-multiple-instances I didn't expect this and thought it would lead to issues when scaling out - I still think the blob storage in the accepted answer is the best way to go, but using the D:\ drive for the app does seem to be viable too - Would be good to know if those files are definitely retained should the app service instance be migrated internally by Azure – Dan Harris Oct 20 '20 at 14:18