Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add Virtual Directory to an Azure Website using Powershell

Is there a way to add a Virtual Directory to an Azure Website using Powershell?

Background: we have a single solution with an ASP.Net MVC application and a Web.API projects. We are publishing the application into the root of an azure website, and the Web.API into a virtual directory under it.

This works well as long as you add the virtual directory manually in Azure portal. (Project settings do not propagate to the website settings for some reason).

As we are looking to automate the deployment process we would like to add the missing virtual directory using a Powershell script.

like image 446
DivineOps Avatar asked Dec 05 '14 22:12

DivineOps


1 Answers

Looks like a valid (if somewhat complex) answer here:

The short of it is: You gotta use AzureResourceManager and work with a Microsoft.web/sites/config object to get and set Virtual Directories.

https://social.msdn.microsoft.com/Forums/azure/en-US/990f41fd-f8b6-43a0-b942-cef0308120b2/add-virtual-application-and-directory-to-an-azure-website-using-powershell?forum=windowsazurewebsitespreview

like image 181
Ben Finkel Avatar answered Sep 29 '22 11:09

Ben Finkel