How To Use Blobs

Run the sample application in Azure

To publish the application this sample application to Azure, you’ll need an Azure Storage account. The easiest way to do this is with Visual Studio Connected Services.

Create a storage account with Connected Services

  1. In Solution Explorer, right-click on Connected Services.
  2. From the context menu, select Add > Connected Service.
  3. In the Connected Services dialog box, select Cloud Storage with Azure Storage, and then select Create a new Storage Account.

A screenshot of creating a Storage account with Visual Studio Connected Services

  1. In the Azure Storage dialog box, complete the form. Under Resource Group, select Create new. Under Location, pick anything you like.
  2. Once your account has been created, click Add. This will install all the necessary dependencies that you’ll need to get started.

Add the connection string to the release configuration file.

After you’ve added a service reference through Connected Services, it will have placed a true connection string in the appSettings section of your Web.config like so:

    <add key="AzureStorageConnectionString" value="UseDevelopmentStorage=true" />

    <!-- Azure Storage: STORAGE_NAME -->
    <add key="<STORAGE_NAME>_AzureStorageConnectionString" value="DefaultEndpointsProtocol=https;AccountName=STORAGE_NAME;AccountKey=<ACCOUNT_KEY_HERE>;" />

Replace the "UseDevelopmentStroage=true" value with the real connection string generated by Connected Services.

Publish to Azure

Finally, you can publish to Azure!

  1. In Solution Explorer, right-click and select Publish.
  2. Under Microsoft Azure App Service, ensure that Create New is selected and press the Publish button.
  3. Fill out the form - all fields should be automatically populated with values that will allow you to create a new App Service web app with the project.
  4. Click Create.

After it creates the App Service web app, and the application is fully published, a browser window will open and you can interact with the sample app live over the internet!

I ran into an issue I published my app on Azure