In this post, I describe a website deployment troubleshooting task that I was able to quickly diagnose and resolve using Azure Portal and Kudu.

Figure: Using Kudu to troubleshoot web deployment errors.
1. The Problem
I recently migrated my blog to ASP.NET (detailed in this post), and almost immediately ran into a puzzling error after deploying the website to an Azure App Service instance. For some reason, none of my blog posts were showing up on the index page, and I was receiving HTTP 500 errors after navigating to the expected correct URLs of each blog post. This is in contrast to my development environment testing, in which I was able to see all blog posts successfully enumerated on my index page and was able to visit each blog post.
2. Troubleshooting Steps
The first step I took was to open Azure Portal and inspect the various logging services that are present within the Monitoring group. Taking a look at the Log stream page, and setting the appropriate options in the App Service logs page, I was able to verify that I was receiving HTTP 500 errors by observing the Application and Web server logs. My next step was to ascertain if the missing blog post files were present within the website's deployed file structure. To do this, I navigated to the Development Tools group within Azure Portal, selected the Advanced Tools section, and opened the Kudu web page in a new tab (this is somewhat confusing, since the link to the Kudu web page is simply "Go" without any mention of "Kudu").

Figure: Link to the Kudu page within the Advanced Tools page.
On the Kudu web page, there are several sections that pertain to different areas of interest and troubleshooting activity. Since I was interested in exploring the deployment file structure, I navigated to Debug console 🡺 Powershell, which opens a new view that contains a file structure navigation interface and a Powershell console. Using the file structure interface, I was able to verify that the blog posts were not present on the deployed website.

Figure: Kudu file structure interface and console within the Debug console page.
3. Solution
Using the info from the Azure Portal logs and the Kudu Debug console, I was able to realize my mistake: I had misplaced my blog post directory outside of the website root! This was consistent with the differences between the local development environment and the deployed website. The fix was very simple: by moving the blog post directory to within the wwwroot, updating the corresponding Razor Pages routing path, and redeploying, the blog posts were able to be enumerated and viewed on the website.
4. Conclusion
That covers one of my first real-world use cases for Kudu. If you made it this far, thanks for reading and happy coding.