2
votes

When I run my web application from Visual Studio I get the following message:

Unable to connect to the configured development web server

It then refuses to run.

How do I resove this issue?

2
There's far from enough information to help you with your problem here. Re-think your question and add some specific diagnostic information and you have a chance of receiving some assistance. Otherwise, you're question's going to get closed.Steve Morgan
I press the green start button (used to debug the application). The message then appearsDmitry Makovetskiyd
What sort of application are you writing? What is it supposed to do?NotJarvis
running visual studio as an administrator fixes this for meDan Hastings
Lots of fixes here: stackoverflow.com/questions/990033/… Deleting .vs\applicationhost.config fixed it for me. Not really sure why this was closed. There is an exact error message and how it occurred for the user. It's not vague at all.b_levitt

2 Answers

3
votes

Please try after restarting your machine.

-2
votes

Please follow these six steps:

  1. Select the “Tools->External Tools” menu option in VS or Visual Web Developer. This will allow you to configure and add new menu items to your Tools menu.

  2. Click the “Add” button to add a new external tool menu item. Name it “WebServer on Port 8010” (or anything else you want).

  3. For the “Command” textbox setting enter this value: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebD ev.WebServer.EXE (note: this points to the web-server that VS usually automatically runs).

  4. For the “Arguments” textbox setting enter this value: /port:8010 /path:$(ProjectDir) (or any port you like)

  5. Select the “Use Output Window” checkbox (this will prevent the command-shell window from popping up.

Once you hit apply and ok you will now have a new menu item in your “Tools” menu called “WebServer on Port 8010”. You can now select any web project in your solution and then choose this menu option to launch a web-server that has a root site on port 8010 (or whatever other port you want) for the project.

You can then connect to this site in a browser by simply saying http://localhost:8010/. All root based references will work fine.

  1. The last step is to configure your web project to automatically reference this web-server when you run or debug a site instead of launching the built-in web-server itself. To-do this, select your web-project in the solution explorer, right click and select “property pages”. Select the “start options” setting on the left, and under server change the radio button value from the default (which is use built-in webserver) to instead be “Use custom server”. Then set the Base URL value to be: http://localhost:8010/

Obviously I don't know if this is the problem you had but definitely it is something similar, essentially the problem should be that the same port used by your Development Server is not available because it is already used by another web server.