Tag Archives: WindowsAzure

Upload file to Azure Cloud Storage Via Asp.Net Web App

windows_azure

Intro

Micrososft WindowsAzure is a rock solid Cloud platform that enables you automatically scales in/out your web application.
Not only scaling capabilites but also storing your files whether they are big or small in Azure Cloud Storage makes your mind free from conserning your own reliable storage on premise.
I give you basic example how to upload a file to Azure Cloud Storage via Web App using Asp.Net C#. Also to provide a link for user to download that uploaded file.

Create Storage Account or Use Local Development Storage

If you are still under development and run the web app under local PC/Laptop then you can use Development Storage.
Install necessary Azure SDK using Visual Studio 2013 or 2015 or Microsoft Web Platform Installer. After the installation done you should have Compute Emulator and Storage Emulator.
The storage emulator must be started properly before hand in order to run your Storage application in your local environment.

To access your storage you must supply Storage Connection String. Since we are using local environment then the Storage Connection String is UseDevelopmentStorage=true.
Please pay attention of it is a case sensitive.

After you finish your development and want to publish it on the cloud then you must register for Storage Account withing Azure portal and change your Storage Connection String properly in your code or configuration file.
Continue reading

Advertisements