Gary Davis' Blog

DotNET/PayPal Development and other Techie Stuff
posts - 45, comments - 112, trackbacks - 0

How I Solved the VS2010 Error: "Unable to start debugging…"

I received error message "Unable to start debugging on the web server" in Visual Studio 2010. I clicked the Help button and followed the related suggestions without success.

This happens with a newly created local ASP.Net project when modified to use IIS instead of Cassini (which works for debugging). It immediately pops up the error. Nothing shows up in the Event Viewer. This also happens with VS2008. Debugging used to work.

I am able to attach to the w3wp process to debug. It works but is not as convenient as F5.

I posted the problem at Experts-Exchange and StackOverflow. The answer came from Jeroen at StackOverflow:

  1. In Regedit, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  2. Right-click Lsa and create a new DWORD value
  3. Name it DisableLoopbackCheck
  4. Set its value to 1
  5. Reboot (instead, I killed the msvsmon.exe process and restarted Visual Studio)

My website (and IIS7.5) is on my local PC (Windows Server 2008 R2).

After finding that solution, I searched a bit on LSA and found this related KB article: http://support.microsoft.com/kb/896861 – it’s about IIS 5.1! It is something about a loopback security check that helps prevent reflection attacks.

Also reference Min Kwan Park’s blog which has lots of possible solutions for various debugger issues (though this is and old posting): http://blogs.msdn.com/b/mkpark/archive/2004/03/09/86872.aspx

 [Update]

The debug started to fail again in the same way, immediately displaying the Unable to start debugging error after the compile. Killing the msvsmon and restarting VS2010 did not help. As soon as I click F5, msvsmon.exe shows up on the taskmanager list and the error displays.

Print | posted on Friday, August 06, 2010 9:56 AM |

Feedback

Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

In the web.config, do you have <compilation debug="false">?

In VS 2008, you used to get a friendly warning with an offer to set it to true for you.

In VS 2010, I was getting "Unable to start debugging on the web server. The web server is not configured correctly. See help for common configuration errors. Running the web page outside of the debugger may provide further information.".

I set debug to true and I can now debug OK.

It has just taken me 6 hrs to verify a two line code change.
8/17/2010 12:08 PM | Carl
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Well, you are not the only one. I'm spending more time to solve those stupidities, then to solve my own problems.
9/22/2010 3:59 AM | Wannes
Gravatar

# re: How I Solved the VS2010 Error: "Unable to start debugging…"

Genius :)
11/2/2011 4:40 AM | fakhre

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 8 and 8 and type the answer here:

Powered by:
Powered By Subtext Powered By ASP.NET