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
- In Solution Explorer, right-click on Connected Services.
- From the context menu, select Add > Connected Service.
- In the Connected Services dialog box, select Cloud Storage with Azure Storage, and then select Create a new Storage Account.
- In the Azure Storage dialog box, complete the form. Under Resource Group, select Create new. Under Location, pick anything you like.
- 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:
<appSettings> <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>;EndpointSuffix=core.windows.net" /> </appSettings>
"UseDevelopmentStroage=true" value with the real connection string generated by Connected Services.
Publish to Azure
Finally, you can publish to Azure!
- In Solution Explorer, right-click and select Publish.
- Under Microsoft Azure App Service, ensure that Create New is selected and press the Publish button.
- 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.
- 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