Debugging ASP.NET application hosted on IIS 7 running of Windows 7 using Visual Studio 2010 is a bit different from debugging applications hosted on IIS running on Windows XP. The key differences are Visual Studio 2010 demands for administrator mode and IIS runs under the process name w3wp.exe instead of aspnet_wp.exe. Here are the detailed steps to attach Visual Studio 2010 debugger to IIS 7 on Windows 7.
1. Launch Visual Studio 2010 in Administrator mode(right click on Visual Studio Icon and choose the option Run as Administrator)
2. Open source code the site you want to debug
3. Go to Tools -> Attach to Process.; Opens up Attach to Process.
4. In Attach to Process dialog box, check the option Show process in all sessions.
5. Search for the process w3wp.exe, and click on Attach button.
6. Accept the warning messages. That’s is you are done. Visual Studio is now attached with IIS for debugging.