Reputation: 30175
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.
Here is my settings:
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.
Upvotes: 25
Views: 38909
Reputation: 573
Im my case this error message (VS2017) was caused by the default http binding in IIS, port 80. Instead of being empty, "hostname" contained the name of my machine.
Solution: IIS-Default site-Bindings...- port http 80 - hostname make blank, or enter localhost
Upvotes: 0
Reputation: 2584
see this also HTTP Error 404.3-Not Found in IIS 10 as it helped me (HTTP Activation need to be enabled in Windows features)
Upvotes: 0
Reputation: 1619
My issue was related 405 as attached below
My issue got resolved after making my projects properties(Web and Build) as given below
Upvotes: 0
Reputation: 848
Old post but I recently had this issue and making sure that the following settings were enabled in 'Programs and Features' (Windows 10) fixed the issue for me:
Upvotes: 10
Reputation: 39
Recently I have faced the same issue in VS2013 Professional, instantly I get error 'Unable to start debugging on web server". I observed that whenever my current page is MVC view (.cshtml) file and I start debugging , the error window prompts every time. As switch the current document in my project to controller (.cs) file, and starts debugging, it works properly. So my workaround is to debug my code I have to be on (.cs) file not on (.cshtml / web.config) file. Hope that helps!
Upvotes: 1
Reputation: 311
Another reason for this problem is that you don't run visul studio Run as administrator.
Upvotes: 0
Reputation: 11
This happened to me because I was using the Rewrite module to redirect to https. I was running https://localhost/WebSiteName, but had put my machine name in the https binding in IIS Mgr, Default web Site, Bindings. When I removed the machine name it worked.
Upvotes: 1
Reputation: 6758
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
Upvotes: 8
Reputation: 30175
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
Upvotes: 19