Search code examples
azuredeploymentazure-web-app-servicecloudazure-cost-calculation

Add Virtual applications and directories on my Azure WebApp


I want to deploy 2 applications to the same WebApp (Angular and .Net), so the solution I found was to create a new "Virtual Applications and Directories" in WebApp, then I can deploy the 2 applications to different directories. So, will this procedure increase the cost of my service? Is there another way to do this? What are the disadvantages of doing it this way?

enter image description here


Solution

  • I want to deploy 2 applications to the same WebApp (Angular and .Net),

    Yes, the easy option available to add multiple applications to a single Azure App Service is using Virtual applications and directories under Path Mappings.

    • But this option is available only for Azure Windows App service (not for Linux).

    enter image description here

    • As one of your applications is Angular, make sure you want to deploy it in Windows Environment.

    will this procedure increase the cost of my service?

    AFAIK, both the applications run under the same App Service plan under same root directory. And the charges will be based on the resource consumption.

    • If one of your application requires additional resources and you need to scale up the resources.
    • You don't have option to scale up only 1 app.You need to scaup the complete App Service plan.

    enter image description here

    • But as already mentioned the cost will depend on the resource consumption.

    Alternative Approach

    • As you have mentioned your App is Angular + .NET, In Visual Studio, you have a direct template to work with Angular and .NET Core.

    enter image description here

    • I have selected the same template and deployed the default code.
    • You can see the Virtual Path is configured only for the root path.

    enter image description here

    • But the applications are running as root(angular) and Sub Directory(.NET Core).

    Output: enter image description here