How to solve “Microsoft Visual Studio (VS)” error “Unable to connect to the configured development Web server”

Visual StudioIis ExpressAccess Rights

Visual Studio Problem Overview


PROBLEM

If you start using "Microsoft Internet Information Services Express (IIS)" from "Microsoft Visual Studio (VS)" you may get when you run Build this error message

Unable to connect to the configured development Web server.

Failed to register URL "http://{ip_addr}:{port}/" for site "{project_name}" application "/". Error description: Access is denied. (0x80070005)

What kind of rights is it?

Visual Studio Solutions


Solution 1 - Visual Studio

SOLUTION

This means that you are missing the right for using it. Create it with Netsh Commands for Hypertext Transfer Protocol > add urlacl.

  1. Open "Command Line Interface (CLI)" called "Command shell" with Win+R write "cmd"

  2. Open CLI windows like administrator with mouse context menu on opened windows or icon "Run as administrator"

  3. Insert command to register url

netsh http add urlacl url=http://{ip_addr}:{port}/ user=everyone

Note

Solution 2 - Visual Studio

Delete autogenerated config files on the project folder.

  1. Close Visual Studio projects.
  2. Delete .vs folder on project folder that includes applicationhost.config file.

Visual Studio will generate a new config for this project.

Solution 3 - Visual Studio

Opening Visual Studio as administrator will fix the problem.

Solution 4 - Visual Studio

I solved the error by changing the port for the project.

I did the following steps:

  1. Right click on the project.
  2. Go to properties.
  3. Go to Server tab.
  4. On tab section, change the project URL for other port, like 8080 or 3000.

Good luck!

Solution 5 - Visual Studio

We solved this problem with deleting .vs folder on project folder and deleting temporary ASP.NET files.

1. Close the Visual Studio.
2. Delete .vs folder on project folder that includes applicationhost.config file.
3. Delete temporary ASP.NET Files located: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root

Solution 6 - Visual Studio

I am using visual studio 2015. Deleting .vs folder in the project folder helped me to fix this. You must close the visual studio first.

Solution 7 - Visual Studio

Solution 1

If you use a newer version of Visual Studio, you may not have this problem. I'm currently using Visual Studio 2015 and it works great.

Solution 2

You can solve this problem by changing the project's port number.
Because the reason is a port number conflict with some other application.

I had the same issue and fixed by doing that (by changing the port number).
I had solved this here : https://stackoverflow.com/questions/22822209/changing-project-port-number-in-visual-studio-2013

If you use a different version of Visual Studio; you may also change the port number by project's Properties Window in Solution Explorer.

Solution 8 - Visual Studio

For me I tried a few of the above - run as administrator, check firewall.

For me it was the IIS Express configuration. A little bit of a "just get it working" fix without much investigation, but deleting the folder IIS Express is located under

C:\Users\UserName\Documents\iisexpress

Not sure what caused the issue for my VS2013 - but I am constantly flipping between VS2013 sites in IIS and IIS Express.

NOTE: When I forget to run VS2013 as Administrator, my Local IIS project gets inserted in the IIS Express applicationhost.config file, which fails to open the web project. Which is really frustrating.

Solution 9 - Visual Studio

Worked for me in VS2003 and VS2017 on Windows 8

  1. Run the command in CMD with admin rights

    netsh http add iplisten ipaddress=::

  2. Then go to regedit path [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters] and check if the value has been added. enter image description here

For more details check https://www.c-sharpcorner.com/blogs/iis-express-failed-to-register-url-access-is-denied

Solution 10 - Visual Studio

I solved this just now, in the system tray (bottom right) you can click ion the IIS icon and stop the current site, then it allowed me to run.

Solution 11 - Visual Studio

I just encountered and resolved this in VS2013 on Windows 7. It is a Web Application Project that doesn't use SSL. But when I examined the Properties Window (F4), SSL was enabled. Setting SSL to false resolved the issue.

However, when verifying before posting this answer, turning it back on did not cause a recurrence of the problem. So it might be that anything that writes to that preferences resolves the problem, rather than the details of what was written.

Solution 12 - Visual Studio

I solved this by restarting my computer. I'm guessing that this port was being occupied by a process that needed to be killed.

Solution 13 - Visual Studio

If you've tried many ways and still have this problem, take a look at your firewall settings and make sure it does not block Visual Studio or IIS !!

This worked for me!

Solution 14 - Visual Studio

I tried almost all the options above, none of them worked for my scenario. Finally I was forced to uninstall IIS Express, re-start the machine, and install the same version again from Microsoft.

Anyway thanks for all the suggestions above.

Solution 15 - Visual Studio

This happened to me on Windows 7 and VS 2013 while viewing a project on the browser after build. I only had to close the browser "Chrome" then made sure that the port is not in use in my Network Activities using some utility then tried again and worked without any problem.

Solution 16 - Visual Studio

Additionally to Bruno's answer I ended up registering the same port for localhost. Otherwise VS2015 was giving me Access Denied error on server start.

netsh http add urlacl url=http://localhost:{port}/ user=everyone

May be it's because I have binding for localhost in aplicationhost.config also.

Solution 17 - Visual Studio

Visual Studio 2015, Windows 10, project source control was managed in TFS Online.

None of this worked form me, issue appeared after a reformat of Windows 10 and subsequent reinstall of VStudio 2015. I mapped projects to the same folder (residual folders and files were still there.)

Deleting the entire old project (specifically the .VS) and then remapping it fixed everything.

Solution 18 - Visual Studio

Just update Visual Studio, this is the simplest solution that worked for me.

Solution 19 - Visual Studio

Delete .vs folder on project folder and Delete temporary ASP.NET Files located: C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root

And the Open the Visual Studio in Admin mode and run the program

Solution 20 - Visual Studio

i created a new solution and imported the projects.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionBGBRUNOView Question on Stackoverflow
Solution 1 - Visual StudioBGBRUNOView Answer on Stackoverflow
Solution 2 - Visual StudioAhmet ArslanView Answer on Stackoverflow
Solution 3 - Visual StudioHashem AboonajmiView Answer on Stackoverflow
Solution 4 - Visual StudioFranciscoView Answer on Stackoverflow
Solution 5 - Visual StudioEduardo PelaisView Answer on Stackoverflow
Solution 6 - Visual StudiofrzView Answer on Stackoverflow
Solution 7 - Visual StudioBengi BesçeliView Answer on Stackoverflow
Solution 8 - Visual StudioAndezView Answer on Stackoverflow
Solution 9 - Visual StudioSerge VoloshenkoView Answer on Stackoverflow
Solution 10 - Visual StudioM HView Answer on Stackoverflow
Solution 11 - Visual StudioBryanView Answer on Stackoverflow
Solution 12 - Visual StudioMikeView Answer on Stackoverflow
Solution 13 - Visual StudioM.FarahaniView Answer on Stackoverflow
Solution 14 - Visual Studiosm2mafazView Answer on Stackoverflow
Solution 15 - Visual StudiohsobhyView Answer on Stackoverflow
Solution 16 - Visual StudioalehroView Answer on Stackoverflow
Solution 17 - Visual StudioHouseCatView Answer on Stackoverflow
Solution 18 - Visual StudioMohammad BarbastView Answer on Stackoverflow
Solution 19 - Visual StudioSumant SinghView Answer on Stackoverflow
Solution 20 - Visual Studioelle0087View Answer on Stackoverflow