In my role at Microsoft I am working with State and Local Government customers. My job is to help them understand and better utilize Microsoft Azure cloud services. Recently I have had several conversations with my customers regarding a need to easily share files with the public. These files might be government datasets, crime statics, or results of FOIA requests. No matter what the content, the customers are concerned about the impact hosting such a solution internally would have on their infrastructure. Sometimes these files are seldom downloaded, but other times a news story or other interest might cause massive downloads from locations all over the globe.
Sure there are lots of file sharing solutions out there. OneDrive, Box, DropBox, just to name a few. The problems with these solutions is that you have limited control over how the files are presented to the user and limited access to reporting. Several of my customers have asked how Azure might help them with providing files at a large scale, enabling them to generate logging details, and to reduce risks of large download spikes.
Thinking over the requirements, I came up with several possible solutions. The simplest involved setting up one or more virtual machines in Azure that would run IIS with directory browsing enabled. This would work, but there is no branding options and the customer still has to manage and patch the virtual machines.
Another option which is similar to the previous one is to utilize an Azure Web App with directory browsing enabled. This would be just like the prior option with VMs but the customer wouldn’t have to manage or patch the underlying system. Unfortunately even with the largest Azure Web App size we are limited to 500GB of storage and the lack of branding is still an issue.
After looking at several other options I decided to create a quick simple .NET application that would utilize an Azure Web App along with an Azure Storage Account for public file sharing. This would enable me to brand the site, store up to 500TB of data, and generate any necessary logging needed. I call this demonstration solution Azure Simple File Share.
I have tested the application by loading just over 10,000 files into an Azure Storage account and I have been very impressed so far at the speed of rendering the file and folder structures.
If you would like to see the application in action, jump on over to: http://asfs.azurewebsites.net/
If you would like to learn more about how the application works or to grab a copy of the source code, head over to GitHub: https://github.com/mphacker/AzureSFS
If you build a production solution off of this, let me know! I would love to see this in action in the real world. If you make updates and would like to contribute code back, contact me using the comments section below.
Important note: This application is not endorsed or supported by Microsoft. No official support is provided by me or anyone else. The application has not been code reviewed for security and/or nasty bugs. If you choose to utilize this demonstration application or any of it’s source code, you are on your own.