Unable to Debug the ASP.NET website in Visual Studio

asp.netdebugging

I used to be able to attach to my w3wp process and Debug my web application, but this is not working anymore. I have no idea what changed to break this. I'm using Visual Studio 2008 SP1. And I'm debugging in IIS, not using ASP.NET's own server (i.e. I don't Run my project, I simply attach to a running process (w3wp).

My breakpoints simply have the "breakpoint will currently not be hit. The source code is different from the original version."

What I have tried:

  • Did a solution Clean.
  • Did a solution Rebuild.
  • Made sure that compilation debug=true in my web.config file.
  • Deleted the bin folder
  • Restarted Visual Studio
  • Restarted IIS
  • Restarted my Computer
  • Added a simple Response.Write to ensure that the latest DLL is being used. It is.
  • Made sure that Debug ASP.NET is checked in my project properties. It is.
  • Made sure that all my projects are compiled in my build configuration. They are.

But none of these help. I attach to w3wp, but my breakpoints never get hit.

Any ideas?

Best Answer

I had this problem recently and I ended up first making sure Visual Studio was not running at all on the system.

Then went into this folder and deleted all its content:

C:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\