I got the following error debugging an ASP.NET project earlier today:

Auto-attach to process ‘[2440] w3wp.exe’ on machine ‘…’ failed. Error code 0x8013134b.

The problem was that I had installed .NET 2.0 which had registered ASP.NET 2.0 on the Web Site I was trying to debug.
Fixing it is simple:
1. Run the IIS Manager
2. Right click on the web site with the problem
3. Click the ASP.NET tab
4. Change the ASP.NET version from 2.something to 1.something in the combo and debugging works again

Linda Rawson