System administrators can use the same configuration file across multiple IIS servers thanks to Shared Configuration feature. This file is normally stored in on-prem file server. If you want to store this file in an Azure file share, there is a specific procedure that needs to be followed. Step-by-step instructions are below.
Note: Instead of following the instructions below, you can try to use “Map network drive” feature in Windows File Explorer or the New-PSDrive
command below. In my case, these options didn’t provide a permanent solution (Settings were reverted after a server restart).
New-PSDrive -Name Z -PSProvider FileSystem -Root "\\name.file.core.windows.net\your-file-share" -Credential $credential -Persist -Scope global
Please follow the steps below to link your Azure file share in your IIS server.
net use * \\name.file.core.windows.net\your-file-share /User:your-storage-account-name your-key
Step 3: Copy storage account name and key
The main point in the process is that using a local user account that has the same username and password (key) as your storage account in Azure.
As of now, I am not aware of a way to use a service account to access an Azure file share via IIS. If you access it manually (login to server and go to the path in File Explorer), you can use persistent connections (Another resource is here). However, if you want IIS to access to the share, using a local account seems to be the only way.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.