Snippets of code and fun.
If you have tried to attach to the w3wp process from Visual Studio (2008 in my case) and the w3wp process is greyed out, then I might have a solution for you.
The first link that you might want to read is this one: http://social.msdn.microsoft.com/forums/en-us/csharpide/thread/10A03A88-91D2-456F-8237-66AF5410495EThe user gleason78 complains of a very similar problem - w3wp is greyed out as soon as you start the process, or as soon as you do iisreset and the process starts up again. The solution in very general terms given to him is "another IDE had already attached itself". At first you might think... but what else could have attached itself to my process on this dev machine that only I ever use? The person that originally asked the question in that forum eventually found out that there was a "debugging service" that was running.
And that is exactly where your problem might lie (maybe someone else HAS used your machine in the past?). A debugging service running in the background will immediately attach itself to the w3wp process as soon as the process starts up.
In my case, a co-worker had been debugging something on the machine I was using. He used the Debug Diagnostic Tool http://blogs.iis.net/sukesh/archive/2006/06/02/ddintro.aspx. This tool had a service running in the background at all times, which kept attaching itself to the w3wp process, preventing me from attaching another debugger (from Visual Studio). The service was "Debug Diagnostic Service (dbgsvc.exe)".
There are no instructions here for me to show - simply make sure you go to your Services console (Start > Run > "services.msc") and stop any debugging services that may be attaching themselves to w3wp.