How do I crash the App Pool?

willem picture willem · Jun 15, 2010 · Viewed 9.3k times · Source

Our ASP.NET 2 web application handles exceptions very elegantly. We catch exceptions in Global ASAX in Application_Error. From there we log the exception and we show a friendly message to the user.

However, this morning we deployed the latest version of our site. It ran ok for half an hour, but then the App Pool crashed. The site did not come back up until we restored the previous release.

How can I make the app pool crash and skip the normal exception handler? I'm trying to replicate this problem, but with no luck so far.


Update: we found the solution. One of our pages was screenscraping another page. But the URL was configured incorrectly and the page ended up screenscraping itself infinitely, thus causing a stack overflow exception.

Answer

Aristos picture Aristos · Jun 15, 2010

The most common error that I have see and "pool crash" is the loop call.

public string sMyText
{
   get {return sMyText;}
   set {sMyText = value;}
} 

Just call the sMyText...