Hello,
Welcome to Microsoft Q&A,
This issue often arises due to misconfigurations during deployment. Here's a structured approach to diagnose and resolve the problem:
1. Verify Deployment Artifacts:
- Check Deployed Files: Ensure that your application files are correctly deployed to the
wwwroot
directory. - Access the Kudu Console by navigating to
https://<your-app-name>.scm.azurewebsites.net/DebugConsole
.- Navigate to
site/wwwroot
and confirm that your application files are present. - If files are missing or located in subdirectories (e.g.,
site/wwwroot/your-app/
), adjust your deployment process to place files directly inwwwroot
.
- Navigate to
2. Configure Default Documents:
- Set Default Page: Azure requires a default document (e.g.,
index.html
,default.aspx
) to serve when accessing the root URL.- In the Azure Portal, navigate to your Web App.
- Go to Settings > Configuration > Default Documents.
- Ensure that your application's main page is listed here. If not, add it and move it to the top of the list.
3. Enable Detailed Error Messages:
- Activate Detailed Logs: Detailed error messages can provide insights into the root cause.
- In the Azure Portal, navigate to your Web App.
- Go to App Service Logs.
- Enable Detailed Error Messages.
- After reproducing the error, review the logs in the Log Stream or Log Files section.
5. Validate Application Configuration:
- In the Azure Portal, navigate to your Web App.
- Go to Settings > Configuration
- Ensure that the .Net Version is correct according to the deployed application. If it is not correct adjust it to the correct version and try again.
Please Upvote and Accept the answer if it helps!!