Search code examples
asp.net-mvcazureweb-applicationsdeploymentvirtual-directory

deploy to azure webApp virtual directory


I created an ASP.Net project (.net 4.7.1), it's basically the default temple project without any change at all!

I created a build to publish it to an Azure WebApp- result : works just fine. then I cloned the build and this time I target a virtual directory (I built the virtual directory from the portal and ticked it as an application)

surprisingly, although it has published successfully ( I doubled check from console), but when I browse it , it doesn't work and I get te below error:


HTTP Error 502.5 - Process Failure Common causes of this issue: The application process failed to start The application process started but then stopped The application process started but failed to listen on the configured port Troubleshooting steps: Check the system event log for error messages Enable logging the application process' stdout messages Attach a debugger to the application process and inspect


it doesn't make sense to me, so I tried with different project type and .net version but the result is the same!


Solution

  • I found a workaround if I deploy pure HTML file (without asp.net) in the root, then the virtual directories will start working.

    it looks like it's related to the fact that web.config of the virtual directory inserts something from the config of the root.