title description ms.devlang author ms.author ms.service ms.topic ms.date zone_pivot_groups
Tutorial: Deploy a Web Application Connected to Azure Storage Blob with Service Connector
.
.Net
shizn
xshi
service-connector
tutorial
10/28/2021

Tutorial: Deploy a Web Application Connected to Azure Storage Blob with Service Connector

::: zone pivot=""

This tutorial shows .

In this tutorial, you use the Azure CLI to complete the following tasks:

[!div class="checklist"]

  • Set up

You can also use the Azure portal version of this tutorial.

:::zone-end

1. Set up your initial environment

  1. Have an Azure account with an active subscription. Create an account for free.
  2. Install the Azure CLI 2.18.0 or higher, with which you run commands in any shell to provision and configure Azure resources.

Check that your Azure CLI version is 2.18.0 or higher:

az --version

If you need to upgrade, try the az upgrade command (requires version 2.11+) or see Install the Azure CLI.

Then sign in to Azure through the CLI:

az login

This command opens a browser to gather your credentials. When the command finishes, it shows JSON output containing information about your subscriptions.

Once signed in, you can run Azure commands with the Azure CLI to work with resources in your subscription.

Having issues? Let us know.

2. Clone or download the sample app

Clone the sample repository:

git clone https://github.com/LianwMS/WebAppStorageMISample.git

3. Create App Service

Go to the root folder of repository:

cd WebAppStorageMISample

Create the webapp use webapp up:

az webapp up --name WebAPPStorageMISample --sku B1 --location eastus

4. Create Azure Storage

az storage account create --name storageforwebappsample --resource-group {rg_name} --sku Standard_RAGRS --https-only

5. Build Connection

az webapp connection create storage-blob -g {rg_name} -n WebAPPStorageMISample --tg {rg_name} --account storageforwebappsample --system-identity

6. Validation

https://webappstoragemisample.azurewebsites.net/ You will see "Hello Resource Connector! Current is {UTC Time Now}."