Over a million developers have joined DZone.

Capturing Dumps of Windows Azure Web Sites

DZone 's Guide to

Capturing Dumps of Windows Azure Web Sites

· Cloud Zone ·
Free Resource

Among the hundreds of new feature announcements at Build, one gem is hidden in plain sight: an improvement to the Kudu platform (Windows Azure Web Sites) which enables you to capture a dump file of your website’s process across the wire. No more remoting into the destination VM, fiddling around with tool downloads, and putting the dumps in a shared FTP folder. You can now generate a minidump – or even a full dump if you need to – by hitting a diagnostics endpoint on your website.

Specifically, if you set up a Windows Azure Web Site at foo.azurewebsites.net, you can hitfoo.scm.azurewebsites.net/diagnostics/processes/0/dump and after providing your deployment credentials your download will be ready to go.

To test this, I created a simple ASP.NET MVC application that hangs in one of its controllers:

public class HomeController : Controller 
    // GET: /Home/ 

    public ActionResult Index() 
        return View(); 

I deployed the application to Windows Azure Web Sites, hit the offending controller, and while the browser was indefinitely waiting for a response, captured a dump file using the diagnostic endpoint.

You can then open these dump files in Visual Studio or WinDbg, or any other dump analysis tool of your choice. For example, when I opened the dump in Visual Studio, I could easily find the outstanding request and the call stack of the hung thread using the Parallel Stacks window.

To summarize, obtaining a dump file (even a minidump) of a running web sites is an extremely powerful capability, and having the ability to do so web sites running in Windows Azure is nothing short of incredible. Good luck debugging your own web sites with this trick!


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}