Deploy multiple projects on single azure web app

Bhavika Nimbark 26 Reputation points
2020-07-08T14:06:36.38+00:00

I want to deploy multiple asp.net project and API on single azure web app.
I have tried to deploy multiple projects on azure web app same as per deploying-multiple-virtual-directories-to-a-single-azure-website link but it won't work for me.
I have created virtual application on azure web app after that I have pubilshed the API
But when I tried to access it by https://web.example.com/Common it throws an below error:

The page cannot be displayed because an internal server error has occurred.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,085 questions
0 comments No comments
{count} votes

Accepted answer
  1. Mauricio Rosales 81 Reputation points
    2020-09-20T06:23:04.887+00:00

    Hello bhavikanimbark-2740

    We have a similar setup working under app services, I believe all you need is to remove the wwwroot from the physical path of your apps, for example we currently have

    site\cms and site\api

    and they both work fine.

    regards,

    1 person found this answer helpful.
    0 comments No comments

4 additional answers

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 19,186 Reputation points
    2020-07-09T12:54:22.3+00:00

    Thanks for asking question! Just to double check if you have saved your settings to apply the changes to Azure while adding the applications for “Virtual applications and directories” and restart it once.

    You may also try removing the aspNetCore handler and click save by editing the web.config file in this sub directory. You can do it by using kudu console and then clicking the edit button in front of web.config file. As When adding applications to an IIS Site's root application, the root application web.config file should include the section, which adds the ASP.NET Core Module as a handler for the app. Applications added to the root application shouldn't include the section. If you repeat the section in a sub-application's web.config file, you will receive a 500.19 (Internal Server Error) referencing the faulty config file when you attempt to browse the sub-application. Check this official document

    Let me know if issue persists.


  2. Grmacjon-MSFT 16,956 Reputation points
    2020-07-09T19:48:57.257+00:00

    Hi @BhavikaNimbark-2740,

    Can you try using this URL https://web.example.com/ to access the app? you also try setting up your
    virtual applications and the directories as shown here.


  3. Gaurav Kohli 1 Reputation point
    2022-01-27T16:09:18.587+00:00

    hi i have api and angualr project on same app service ,
    /site/api
    /site/webapp

    but when i try to hit /api it gets redirected to website instead of swagger file

    0 comments No comments

  4. Gaurav Kohli 1 Reputation point
    2022-02-11T21:44:00.183+00:00

    doesnt works

    0 comments No comments