title: using virtual directories in a single azure website
body: <p>I've found this <a href="https://stackoverflow.com/questions/43073570/create-virtual-directory-on-same-azure-web-app/44488893">answer</a> coherent to <a href="https://blogs.msdn.microsoft.com/tomholl/2014/09/21/deploying-multiple-virtual-directories-to-a-single-azure-website/" rel="nofollow noreferrer">this</a> old article but both don't work. Thus I'm here to ask a new solution that works with VS2017.
  I'll explain more in detail:
  First time you define a virtual directory (as "/site1" and physical folder "site\site1") and try to publish from VS2017, you receive an error (cannot write into the specified path) and cannot publish.
  Then if you enter into the console (from portal.azure.com) and manually create the folder under d:\site with "md site1"), the publish process works (and lot of files have been created under the new folder) and finishes with a "1 successful...", BUT when you browse to the new ..../site1 you receive the following error message:
  "The page cannot be displayed because an internal server error has occurred."</p>
  
  <p>Cannot find anything around on the web to solve this specific error (in one old doc they were saying it is due to separate git repos for the 2 projects (in the same solution), one targeting to the root folder and another one targeting the virtual directory, but I cannot understand why different source controls should make troubles in production when publishing through VS2017)...</p>
  
  <p>Anybody know how to solve this?</p>
  
  <p>UPDATE as requested by David Ebbo:
  I think the problem is a configuration problem Azure side (the other articles don't explain you have to create a physical folder through console when defining virtual directories) and/or runtime error (when the physical folder is created the publishing process from VS2017 works and it is completed successfully).</p>
  
  <p>Here are more details to understand the context:
  1) the Visual Studio Solution contains 2 project: one "main project" (empty .NET Core project with "Hello world!") with publish profile targeting the root folder of the Azure website + another "child project" (standard MVC Core.NET template project with no customization) with publish profile targeting the same Azure site with "/site1" added to the tail of "site name" and "site url".
  2) If I try to publish the child project to the root folder of the site, everything works fine (but of course I overwrite the "main project"), thus it's not a code/version problem.
  3) Going through console, I can see the folder d:\home\site\site1 contains files "similar" to the ones present in d:\home\site\wwwroot for the main project.</p>