NOTE: That is steered if you end up utilizing ASP.NET, the not Core model. In case you are utilizing ASP.NET Core then see the underside of this text for the beneficial method.
I mounted my very own storage to an Azure App Service Internet App and I needed to then have my web site direct site visitors to that content material primarily based on a folder.  I adopted these directions to create the mount.  The configuration of my mount appeared like this.

image

image

Determine 1, Mount storage, azure app service, azure information, path mappings

You’ll be able to view the configuration and the content material within the drive by way of KUDU/SCM.  You will discover the drive mapping by wanting on the atmosphere variables on KUDU, the one you need is called WEBSITE_MOUNT_<NAME>.

image

Determine 2, Mount storage, azure app service, azure information, path mappings

Initially, what I believed my subsequent step was going to be was to create a digital listing which factors to the Mount path.  However once I tried to do this I realized, or relearned that when working app companies that the Bodily path have to be a location inside website.

image

Determine 3, Bodily path have to be a location inside website

I labored by many makes an attempt and hacks till I discovered this method that labored for me.  It makes use of XML Doc Transformation (XDT) so as to add a digital listing to IIS that factors to the D:mountsbrainjammer mount.  I wrote this text some years in the past which describes this in some extra particulars and one other instance.  Making modifications to the applicationHost.config on Azure App Service

Right here is a replica of the XDT file I used.

Place it into the D:homesite listing and restart the location. **Warning** be very cautious with this, for those who make a typo or one thing, then your website is hosed. I needed to delete and recreate my app a couple of occasions. You possibly can presumably FTP to the location and take away the XDT file if vital.

image

Determine 4, Mount storage, azure app service, azure information, path mappings

Whenever you execute this syntax and think about the applicationHost.config file you will note the configuration is utilized.

kind D:localconfigapplicationHost.config > myAppHostConfig.config

image

Determine 5, Mount storage, azure app service, azure information, path mappings

Then you’ll be able to entry that handle endpoint with the appended digital listing.

image

Determine 6, Mount storage, azure app service, azure information, path mappings

NOTES / Feedback:

  • This resolution might be a piece round for a situation the place you can’t carry out this in your code.  I didn’t take a look at this, however it appears attainable to code your software to do that as a substitute of attaining it from a configuration perspective.  However this assumes you’re working ASP.NET Core.
  • Be sure your Storage Account is in the identical area/location because the App Service for efficiency causes.
  • There are Static Web site which lets you expose the content material you may take into account that if it really works in your situation
  • I didn’t take a look at this in a situation wherein the cases scale out.  There may be an ID within the XDT instance, you may must make that dynamic as a substitute of static.  XDT has a number of choices