Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to start debugging on the web server. The remote server returned an error: (404) Not Found. Error when starting debug in Visual Studio

I have set up project to be run on IIS for some time ago and when I did press F5 it did connect no problem. But recently this stopped working and I did get this error when I press F5 / press Debug->Start debugging:

Unable to start debugging on the web server. The remote server returned an error: (404) Not Found.

enter image description here

Here is my settings:

enter image description here

I am not sure what happened, probably some VS updates or Windows updates, but I've tried to google everywhere and nothing had worked. Attach to process works fine as before, but this simpler way stopped doing the trick.

Update:

Have tried Process Monitor to figure out what is going wrong and it looks like w3wp tries to access path MyProjectFolder\debugattach.aspx and the result is "NAME NOT FOUND". Don't know if this is the root of the problem though.

like image 501
Ilya Chernomordik Avatar asked Oct 31 '17 07:10

Ilya Chernomordik


People also ask

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.

How do you fix Visual Studio Cannot start debugging because the debug target is missing?

Go to Build > Configuration Manager, and make sure the project has selected the Build. Then rebuild the project and see. If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".


2 Answers

It appears that one of my colleagues has edited the web.config and added request filtering where he has removed the "DEBUG" verb. This disallowed debugging on F5. After adding it (or removing request filtering) everything works fine.

P.S. A lot of other possible problems with similar error is described here

like image 110
Ilya Chernomordik Avatar answered Sep 28 '22 05:09

Ilya Chernomordik


In my case (Windows 10 & Visual Studio 2017) I had to install ASP.NET 3.5 and ASP.NET 4.7 under the Internet Information Services.

Click here to see the solution

like image 20
Husam Ebish Avatar answered Sep 28 '22 03:09

Husam Ebish