Begivenhed
17. mar., 21 - 21. mar., 10
Deltag i meetup-serien for at bygge skalerbare AI-løsninger baseret på brugscases fra den virkelige verden sammen med andre udviklere og eksperter.
Tilmeld dig nuDenne browser understøttes ikke længere.
Opgrader til Microsoft Edge for at drage fordel af de nyeste funktioner, sikkerhedsopdateringer og teknisk support.
Azure Storage is Microsoft's cloud storage solution for modern data storage scenarios. Azure Storage offers highly available, massively scalable, durable, and secure storage for data objects in the cloud. This guide shows how to mount Azure Storage Files as a network share in Windows code (noncontainer) in Azure App Service.
Azure Storage supports Azure Files Shares and Premium Files Shares for App Service. Azure Storage isn't the default storage for App Service. It's billed separately. You can also configure Azure Storage in an ARM template.
The benefits of custom-mounted storage include:
The following features are supported for Windows code:
Here are the three options to mount Azure storage to your app:
Mounting option | Usage |
---|---|
Basic | Choose this option when you mount storage by using the Azure portal. You can use the basic option as long as the storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. In this case, the portal gets and stores the access key for you. |
Access Key | If you plan to mount storage using the Azure CLI, you need to obtain an access key. Choose this option storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. |
Key Vault | Also use this option when you plan to mount storage using the Azure CLI, which requires the access key. Choose this option when using Azure Key Vault to securely store and retrieve access keys. Azure Key Vault has the benefits of storing application secrets centrally and securely with the ability to monitor, administer, and integrate with other Azure services like Azure App Service. |
No extra steps are required because the portal gets and stores the access key for you.
In the Azure portal, navigate to the app.
From the left navigation, select Settings > Configuration. Select Path mappings, then New Azure Storage Mount.
Configure the storage mount according to the following table. When finished, select OK.
Setting | Description |
---|---|
Name | Name of the mount configuration. Spaces aren't allowed. |
Configuration options | Select Basic if the storage account doesn't use private endpoints or Azure Key Vault. Otherwise, select Advanced. |
Storage accounts | Azure Storage account. It must contain an Azure Files share. |
Share name | Files share to mount. |
Storage access | Select Key vault reference for Azure Key Vault. Otherwise, select Manual input |
Access key (Advanced only) | Access key for your storage account. |
Mount path | Directory inside your app service that you want to mount. Only /mounts/pathname is supported. |
Application settings | Select the app setting with the Azure Key Vault secret. |
Deployment slot setting | When selected, the storage mount settings also apply to deployment slots. |
Bemærk
Adding, editing, or deleting a storage mount causes the app to restart.
Azure Storage mounts can be configured as a virtual directory to serve static content. To configure the virtual directory, in the left navigation select Settings > Configuration. Then select Path mappings, then New virtual application or directory. Set the Physical path to the Mount path defined on the Azure Storage mount.
To avoid latency issues, place the app and the Azure Storage account in the same region. If you grant access from App Service IP addresses in the Azure Storage firewall configuration when the app and Azure Storage account are in the same region, these IP restrictions aren't honored.
In the Azure Storage account, avoid regenerating the access key that you use to mount the storage in the app. The storage account contains two keys. Azure App Services stores an Azure storage account key. Use a stepwise approach to ensure that the storage mount remains available to the app during key regeneration. For example, assuming that you used key1 to configure storage mount in your app:
If you delete an Azure Storage account, container, or share, remove the corresponding storage mount configuration in the app to avoid possible error scenarios.
The mounted Azure Storage account can be either Standard or Premium performance tier. Based on the app capacity and throughput requirements, choose the appropriate performance tier for the storage account. See the scalability and performance targets for Files.
If your app scales to multiple instances, all the instances connect to the same mounted Azure Storage account. To avoid performance bottlenecks and throughput issues, choose the appropriate performance tier for the storage account.
We don't recommend that you use storage mounts for local databases, such as SQLite, or for any other applications and components that rely on file handles and locks.
If you initiate a storage failover when the storage account is mounted to the app, the mount doesn't connect until the app is restarted or the storage mount is removed and added again.
When virtual network integration is used, ensure app setting, WEBSITE_CONTENTOVERVNET
is set to 1
and the following ports are open: Azure Files: 80 and 445.
The mounted Azure Storage account can be either Standard or Premium performance tier. Based on the app capacity and throughput requirements, choose the appropriate performance tier for the storage account. See the scalability and performance targets for Files.
Azure Storage is Microsoft's cloud storage solution for modern data storage scenarios. Azure Storage offers highly available, massively scalable, durable, and secure storage for data objects in the cloud. This guide shows how to mount Azure Storage Files as a network share in a Windows container in App Service.
Azure Storage supports Azure Files Shares and Premium Files Shares. Azure Storage isn't the default storage for App Service. It's billed separately. You can also configure Azure Storage in an ARM template.
The benefits of custom-mounted storage include:
The following features are supported for Windows containers:
Here are the three options to mount Azure storage to your app:
Mounting option | Usage |
---|---|
Basic | Choose this option when mounting storage using the Azure portal. You can use the basic option as long as the storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. In this case, the portal gets and stores the access key for you. |
Access Key | If you plan to mount storage using the Azure CLI, you need to obtain an access key. Choose this option storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. |
Key Vault | Also use this option when you plan to mount storage using the Azure CLI, which requires the access key. Choose this option when using Azure Key Vault to securely store and retrieve access keys. Azure Key Vault has the benefits of storing application secrets centrally and securely with the ability to monitor, administer, and integrate with other Azure services like Azure App Service. |
No extra steps are required because the portal gets and stores the access key for you.
In the Azure portal, navigate to the app.
From the left navigation, select Settings > Configuration. Select Path mappings, then New Azure Storage Mount.
Configure the storage mount according to the following table. When finished, select OK.
Setting | Description |
---|---|
Name | Name of the mount configuration. Spaces aren't allowed. |
Configuration options | Select Basic |
Storage accounts | Azure Storage account. It must contain an Azure Files share. |
Share name | Files share to mount. |
Mount path | Directory inside your Windows container that you want to mount. Don't use a root directory ([C-Z]:* or /) or the home directory ([C-Z]:\home* or /home). |
Deployment slot setting | When selected, the storage mount settings also apply to deployment slots. |
Bemærk
Adding, editing, or deleting a storage mount causes the app to restart.
To avoid latency issues, place the app and the Azure Storage account in the same region. If you grant access from App Service IP addresses in the Azure Storage firewall configuration when the app and Azure Storage account are in the same region, these IP restrictions aren't honored.
In the Azure Storage account, avoid regenerating the access key that you use to mount the storage in the app. The storage account contains two keys. Azure App Services stores an Azure storage account key. Use a stepwise approach to ensure that the storage mount remains available to the app during key regeneration. For example, assuming that you used key1 to configure storage mount in your app:
If you delete an Azure Storage account, container, or share, remove the corresponding storage mount configuration in the app to avoid possible error scenarios.
The mounted Azure Storage account can be either Standard or Premium performance tier. Based on the app capacity and throughput requirements, choose the appropriate performance tier for the storage account. See the scalability and performance targets for Files.
If your app scales to multiple instances, all the instances connect to the same mounted Azure Storage account. To avoid performance bottlenecks and throughput issues, choose the appropriate performance tier for the storage account.
We don't recommend that you use storage mounts for local databases, such as SQLite, or for any other applications and components that rely on file handles and locks.
Ensure ports 80 and 445 are open when using Azure Files with virtual network integration.
If you initiate a storage failover when the storage account is mounted to the app, the mount doesn't connect until the app is restarted or the storage mount is removed and added again.
Bemærk
NFS support is now available for App Service on Linux.
This guide shows how to mount Azure Storage as a network share in a built-in Linux container or a custom Linux container in App Service. Azure Storage is Microsoft's cloud storage solution for modern data storage scenarios. Azure Storage offers highly available, massively scalable, durable, and secure storage for data objects in the cloud. Azure Storage isn't the default storage for App Service. It's billed separately. You can also configure Azure Storage in an ARM template.
The benefits of custom-mounted storage include:
The limitations of custom-mounted storage include:
You need to mount the storage to the app. Here are three mounting options for Azure storage:
Mounting option | Usage |
---|---|
Basic | Choose this option to mount storage using the Azure portal. You can use the basic option as long as the storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. In this case, the portal gets and stores the access key for you. |
Access Key | If you plan to mount storage using the Azure CLI, you need to obtain an access key. Choose this option storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. |
Key Vault | Also use this option when you plan to mount storage using the Azure CLI, which requires the access key. Choose this option when you use Azure Key Vault to securely store and retrieve access keys. Azure Key Vault has the benefits of storing application secrets centrally and securely with the ability to monitor, administer, and integrate with other Azure services like Azure App Service. |
No extra steps are required because the portal gets and stores the access key for you.
The way that you mount storage depends on your storage access option and whether you use the portal or the Azure CLI.
In the Azure portal, navigate to the app.
From the left navigation, select Settings > Configuration. Select Path mappings, then New Azure Storage Mount.
Configure the storage mount according to the following table. When finished, select OK.
Setting | Description |
---|---|
Name | Name of the mount configuration. Spaces aren't allowed. |
Configuration options | Select Basic if the storage account doesn't use service endpoints, private endpoints, or Azure Key Vault. Otherwise, select Advanced. |
Storage accounts | Azure Storage account. |
Storage type | Select the type based on the storage you want to mount. Azure Blobs only supports read-only access. |
Storage container or Share name | Files share or Blobs container to mount. |
Mount path | Directory inside the Linux container to mount to Azure Storage. Don't use / or /home. |
Deployment slot setting | When checked, the storage mount settings also apply to deployment slots. |
Bemærk
Adding, editing, or deleting a storage mount causes the app to restart.
To validate that the Azure Storage is mounted successfully for the app:
Open an SSH session into the container.
In the SSH terminal, execute the following command:
df –h
Check if the storage share is mounted. If it's not present, there's an issue with mounting the storage share.
Check latency or general reachability of the storage mount with the following command:
tcpping Storageaccount.file.core.windows.net
To avoid latency issues, place the app and the Azure Storage account in the same region. If you grant access from App Service IP addresses in the Azure Storage firewall configuration when the app and Azure Storage account are in the same region, then these IP restrictions aren't honored.
The mounted Azure Storage account can be either Standard or Premium performance tier. Based on the app capacity and throughput requirements, choose the appropriate performance tier for the storage account. See the scalability and performance targets that correspond to the storage type: Files and Blobs.
If your app scales to multiple instances, all the instances connect to the same mounted Azure Storage account. To avoid performance bottlenecks and throughput issues, choose the appropriate performance tier for the storage account.
In the Azure Storage account, avoid regenerating the access key that you use to mount the storage in the app. The storage account contains two keys. Azure App Services stores an Azure storage account key. Use a stepwise approach to ensure that the storage mount remains available to the app during key regeneration. For example, assuming that you used key1 to configure storage mount in your app:
Begivenhed
17. mar., 21 - 21. mar., 10
Deltag i meetup-serien for at bygge skalerbare AI-løsninger baseret på brugscases fra den virkelige verden sammen med andre udviklere og eksperter.
Tilmeld dig nuTræning
Modul
Få adgang til data fra Azure Blob Storage ved hjælp af flere protokoller - Training
Du kan få adgang til dine data fra Azure Blob Storage ved hjælp af forskellige protokoller, f.eks. REST (representational state transfer), Hadoop Distributed File System (HDFS), Network File System (NFS) og SFTP (Secure File Transfer Protocol).
Certificering
Microsoft Certified: Azure Administrator Associate - Certifications
Demonstrer vigtige færdigheder for at konfigurere, administrere, sikre og administrere vigtige professionelle funktioner i Microsoft Azure.
Dokumentation
Deploy a webapp connected to Azure Blob Storage
This tutorial guides you through creating and deploying a web application that connects to Azure Blob Storage using Service Connector.
Kudu service overview - Azure App Service
Learn about the engine that powers continuous deployment in App Service and its features.
SSH access for Linux and Windows containers - Azure App Service
You can open an SSH session to a Linux or a Windows container in Azure App Service. Custom Linux containers are supported with some modifications to your custom image. Custom Windows containers require no modifications to your custom image.