Search code examples
azureazure-web-app-servicepublishasp.net-core-2.0

Failed to publish virtual application to Azure


I have two asp.net core 2.0 projects in the same solution, that I would like to be deployed on the same Azure Application service.

Following this tutorial, I can successfully deploy the first project and add the virtual application path to the second as can be seen: enter image description here

The problem is that when I try to deploy the second project I get the following error :

(9/6/2017 10:25:35 AM) An error occurred when the request was processed on the remote computer. Could not find a part of the path 'D:\home\site\api\App_Offline.htm'.

It looks like it's not creating the virtual application and directory. Any ideias? I've already seen that the directory must match your project name (tried with that and also failed), that it should be site\wwwroot\projectName. What am I missing?


Solution

  • I can reproduce the issue on my side when I deploy my web application to virtual application.

    enter image description here

    If I manually create physical path for virtual application before deployment, I can deploy the app without this issue, you can try it.

    Create Api folder

    enter image description here

    Publish result

    enter image description here