Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS2010 error: Unable to start debugging on the web server

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.

like image 1000
GarDavis Avatar asked May 20 '10 21:05

GarDavis


People also ask

How do I fix unable to start debugging on web server?

Restart your Application Pool. Check that your Web Application folder has the right permissions. Make sure that you give IIS_IUSRS, IUSR, or the specific user associated with the Application Pool read and execute rights for the Web Application folder. Fix the issue and restart your Application Pool.

How do I enable remote debugging on my server?

Using a browser, open the administration console of the remote application server. Expand the Servers node and click Application Servers. Click the name of the server to open the application server properties. Click Debugging Service.

How do I start server in debug mode?

It can be activated when the debugger is started by using the -server command-line option in a elevated Command Prompt window (Run as Administrator).


3 Answers

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.

like image 61
Jeroen Avatar answered Sep 25 '22 21:09

Jeroen


I got a new PC with Windows 7. I installed VS2010 and my development environment and hoped my F5 debug problem would be gone, but it still failed to start the debugger.

This was a good clue since it ruled out the install of software.

I finally traced it down to my HOSTS file. I had an entry for some of my local websites which I can access like "http://testsite.lcl" but the IP I had assigned was my machine's IP instead of using 127.0.0.1 so it looked like a remote server to VS2010. Changing back to 127.0.0.1 resolved the issue.

Thanks for everyone's help on this.

like image 12
GarDavis Avatar answered Sep 24 '22 21:09

GarDavis


I had the same problem. How did I fixed it.

Go to IIS (in my case IIS 7 / Windows 7). Select your web site from the list, click on .NET Compilation in ASP.NET section. Select Open Feature. Check if your Debug is set to True. In my case it was False. Once I changed it to True - I have my debug back :)

like image 10
Alex Avatar answered Sep 23 '22 21:09

Alex