Friday, November 30, 2007

Unable to start debugging on Web Server. Unable to connect to the web server........

Unable to start debugging on Web Server. Unable to connect to the web server.

Your IIS virtual directory is not correctly configured with your web project directory or virtual directory is not available or the IIS is stopped. First you must confirm that your IIS is running sate not in stopped state. If the IIS is in stopped state then u can hit the run button to start the IIS.
If the IIS is in running state then check your virtual directory in IIS. It may not exist or its not pointing to your asp.net project directory. Then you will get a message from the Visual Studio "Unable to start debugging on Web Server. Unable to connect to the web server.........".


You can fix the problem by changing the path of the virtual directory to your current asp.net project folder.

Cannot start service from command line or a debugger. A windows service must first be installed (using installutil.exe) and.......

"Cannot start service from command line or a debugger. A windows service must first be installed (using installutil.exe) and then started with ServerExplorer, Windows Services Administrative tool or the NET START command."

This message is due to the web project is not your start project. I think you have more than one projects in a solution and the asp.net web project is not your start up project.
To make the web project as start up project you can do the following steps:
  1. In Visual Studio, go to Server Explorer window. If the server explorer window is not found you can find it from View menu.
  2. Right Click in the Web Application project shown in your server explorer and select "Set as Start Up Project" option from menu.
We can easily identify the start up project by its name style. If a project is the start up project of your solution then its project name will be shown in bold. If we have not set a project as the start up project, Visual studio will set the current selected/active product as start up project.

For this issue Visual studio will give the following error message...