I'm having an issue where when I attempt to attach my debugger to IIS express, it fails with a "Unable to attach to the process. Catastrophic failure". It then kills my IIS Express session. I have no clue where to begin debugging this issue.
Steps that lead to this:
- My application exists on my local machine
- Documents\IISExpress\config\applicationhost.config has the Site set up
- I run IIS express via an administrative console mode by going to C:\Program Files\IIS Express\iisexpress.exe
- I load up my solution in VS.
- I attach attempt to attach my debugger to IIS Express.
- I get the catastrophic failure error.
- IIS is killed and stopped.
Any idea of where to go for Visual studio logs to see what might have happened? I tried running devenv.exe with the /log option but it did not help with any errors.
I also looked up IIS logs, but nothing out of the ordinary that points to the catastrophic failure.
Are you running more than one site within the same application pool? I was having the same problem and believe that separating the app sites into different application pools fixed the issue.
Additionally I had issue when the wrong start-up project was selected in Visual studio. Make sure the correct start-up project is selected before attaching, though I can't see why this should matter.
Also I created a controller for the debugger to be launched from the application, which no only makes it much easier, also appears to have less issues.
From a bit of playing it looks like the problem is attaching to an IISExpress process when:
If this happens, then for each IIS Express process that is not configured as a startup project:
You are then able to reattach (after refreshing the process list) to the new IIS Express process at that point.
To avoid this dance, you can either:
You are then able to attach to the instances running from your admin console without affecting them.