Over a million developers have joined DZone.

Capturing Dumps of Windows Azure Web Sites

· Cloud Zone

Build fast, scale big with MongoDB Atlas, a hosted service for the leading NoSQL database on AWS. Try it now! Brought to you in partnership with MongoDB.

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!

Now it's easier than ever to get started with MongoDB, the database that allows startups and enterprises alike to rapidly build planet-scale apps. Introducing MongoDB Atlas, the official hosted service for the database on AWS. Try it now! Brought to you in partnership with MongoDB.


Published at DZone with permission of Sasha Goldshtein, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}