I was helping a customer this past week, and when deploying his Angular code into a web app, the following error message was being displayed:
More than often, the problem is where the web app is configured to look for the web application files vs. what is set on the code. To perform this simple check, you can check Kudu tools in the web app, and then click on the Debug Console, and select either CMD or PowerShell.
The interface is simple. Start by clicking on the graphical Windows explorer. The prompt will change automatically to reflect the navigation steps that you are performing. By default, the web app running on Windows will have the site configuration on home\site\wwwroot.
As you can see in the example below, the developer added one extra folder as the root of his application. To solve the problem, we have two simple ways: First, talk to the developer and remove that folder and ask him or her to drop all the files in the root without additional folders. The second approach is to modify the configuration files.
I'm working on my diplomatic skills lately, so I decided to take the second approach. We need to go to the Configuration item in the web app, then click on Path mappings, and configure the physical path to reflect how your application is being published, as depicted in the image below.
More Quick Tips articles
- New from Microsoft: Azure Security Center onboarding guide
- Fixing Azure Key Vault when moving to a different tenant
- Restore Azure Key Vault using just two PowerShell cmdlets
- This overlooked feature in Visual Studio Code can speed release time
- Enabling Front Door managed certificates in Azure: Status update