VS2010 error: Unable to start debugging on the web server

asp.netdebuggingiis-7.5visual studio 2010

I get 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 prompts to set debug="true" in the web.config and then immediately pops up the error. Nothing shows up in the Event Viewer.

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

I also have a similar problem with VS2008 on the same PC. Debugging used to work for both.

I have re-registered Framework 4 (aspnet_regiis -i). I ran the VS2010 repair (this is the RTM version). I am running on a Windows Server 2008 R2 x64 box.

I do have Resharper V5 installed.

There must be some configuration setting or registry value that survives the repair causing the problem.

I'd appreciate any ideas.

Best Answer

Disable the loopback check

(original microsoft page here)

To set the DisableLoopbackCheck registry key, follow these steps:

Click Start, click Run, type regedit, and then click OK.

In Registry Editor, locate and then click the following registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

Right-click Lsa, point to New, and then click DWORD Value.

Type DisableLoopbackCheck, and then press ENTER.

Right-click DisableLoopbackCheck, and then click Modify.

In the Value data box, type 1, and then click OK.

Quit Registry Editor, and then restart your computer.