I am not sure if this has been asked before. I am trying to deploy my two web applications to an azure web app, an asp.net web form application and an asp.net web api. I do know that I can create two different directories and then put my two applications to those two directories. However when I do that and configure like the first image below, my web app works well but my web API get a problem, an error from the web.config file of the web application is shown. I've tried to disable my web application then the web API worked well after that.
This is what my folders look like:
And this is the error that I get:
There is a similar thing that has been posted before here Azure multiple sites in virtual directories but in my case, our applications are not built on ASP.NET CORE
Update:
- I have also tried to add the "System.Web.Optimization" dll to the web api project just to have a try (it actually is not needed) and after that I see another error.
- Lines of code you see in the error image is just from web.config of the web application, that should not be a problem when I try to access the web api.