Mads Kristensen (a.k.a .Net Slave) has posted a nice HttpModule for blocking DoS attacks.  Quite simply, any IP address who accesses you more than X requests per second (defaulted at 10), gets "banned" into a stack for 5 minutes, and then released.  I haven't implemented this myself yet just because I want to make sure there are no issues with it in terms of google or other search engines (You can read my comments over at .net slave). 

For the VB folks out there, I've taken the liberty of converting the module into vb.net.  (hopefully I did it right).  Here's the naughty bits:

Naughty, naughty bits