Reputation: 269
I am running Visual Studio 2008, IIS 7.5 on Windows 7 x32. I am able to run the ASP.NET web site in IIS 7.5 without debugging just fine, but when I press F5 to debug it, I get:
Unable to start debugging on the web server. Unable to connect to the webserver. Verify that the web server is running and that incoming http requests are not blocked by a firewall..
Upvotes: 13
Views: 31907
Reputation: 15
In my case I was unable to debug the application. I also get same error: "Unable to debug application", "Unable to connect to remote server". The issue occurs when API doesn't match with IIS when creating virtual directory; it just creates a path but it will never match if you've deleted something.
Solution:
Upvotes: 0
Reputation: 515
In VS
, right click on your web project --> Properties
Go to the Web tab.
Make sure the appropriate radio button is selected (Use VS Dev Server, Use Local IIS Web Server, etc)
After a computer freeze I've had that value change on me.
Another thing to try:
Run "iisreset
" from an administrative
command prompt (basically just restarts the IIS service)
Upvotes: 15
Reputation: 1315
I had a case, where I could load the site in chrome, but deugger could contact the server. Turns out Chrome auto-maps .localhost addresses, but VS does not.
Adding the localhost address to my hosts file solved the issue.
Upvotes: 0
Reputation: 4967
Make sure that the port defined in the Project Url under the Web tab of the properties of the web project is the same one as defined in the IIS Manager.
I had this issue and fixing the port solved the problem for me.
Upvotes: 0
Reputation: 31
Try the following:
Upvotes: 2
Reputation: 3994
Check if your IIS is running, if isn't try to initialize him and run again on VS.
Upvotes: 6
Reputation: 1
Just to check: See if Windows Authentication is enabled or not? It should be enabled. Internet Information Services (IIS) Manager > Expand PC/Server Name > Expand Sites > Select Default Web Site > Select Authentication. It should be enabled.
Upvotes: 0
Reputation: 34844
Verify that your web.config
has the following entry:
<compilation debug="true" targetFramework="2.0" />
Note: If you are targeting framework 1.1, then obviously change the 2.0
to 1.1
.
UPDATE:
The `targetFramework` attribute is new in .NET 4.0 and later, so to enable debugging on .NET 2.0 and earlier, then you cannot use the `targetFramework` attribute, like this:
<compilation debug="true" />
Upvotes: 0