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

20

53

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?

Clemence answered 10/10, 2013 at 10:42 Comment(0)
C
65

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

Clemence answered 10/10, 2013 at 10:42 Comment(8)
With VS2013 on Win 7 all I had to do was re-start Visual Studio, no need to reboot. Thanks!Hedi
I agree Blake in WIN7 enough it to me the last week too.Clemence
Great answer (+1), but why does this happen in the first place. Everything was Just Working(tm) and then, woke up the next day for work...and it wasn't. Seems very strange.Turnbow
This worked for me, note that I got to run cmd.exe as administrator.Viscosity
I'm on Windows 10. Restarting had no effect. This worked. However, this command requires elevated privileges so you have to run the command prompt as administratorGulick
I also had to run VS as administrator to make it work.Kymric
Dear Microsoft, why is it I have to perform one or more web searches on random Visual Studio failures nearly every single workday?Farinaceous
If you get an error saying Create SDDL failed, Error: 1332, then check this answer https://mcmap.net/q/190300/-create-sddl-failed-error-1332 It seems the user is language dependant.Gillenwater
C
52

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.

Comanchean answered 25/1, 2018 at 15:12 Comment(9)
Thanks this worked for me. Changing the port number and rebuilding the solution didn't work until I deleted the .vs folder.Tertial
This saved my life :)Therapeutic
This solution saved me headaches! From the Solution explorer in Visual Studio, right-click on the solution name for properties, and then click on Open Folder in File Explorer: that's where you'll find the folder to delete.Juan
this should be answerSelfcongratulation
nice trick, maybe these days it's better solution - if more people vote for it I select it @WaqaraliClemence
Thanks, great solutionRhadamanthus
Well that fixed it for me! - everything else failed miserably. Must be some strange corruption when changing PCs accessing the project - or if you switch between "on-network" and "VPN" connection to access project files. +1 from me.Cycloid
Saved my life too.Jea
Thanks this worked for me, after many tries :DUnconditional
F
23

Opening Visual Studio as administrator will fix the problem.

Fowling answered 14/1, 2015 at 12:23 Comment(4)
Yeah. Close Visual Studio, Start as Administrator. Problem solved for me.Ashcroft
I would call this a workaround, not a fix. Since when you need to be administrator to debug with Visual Studio???Goodfellowship
This is still a problem w/ VS '15 & '17. This answer is the only one that seems to work. Right click shortcut-->properties-->advanced-->check run as administrator. Never look back.Tombstone
@Tombstone wrong! In fact my applicationhost.config file is not used anymore, I can delete the file, it's not automatically recreated. And this is a problem because I want to configure other bindings like en.localhost.com.Goodfellowship
H
5

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!

Heartache answered 21/2, 2015 at 19:59 Comment(0)
A
5

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
Agni answered 6/7, 2018 at 13:20 Comment(1)
if that really works for everybody after 4years it's niceClemence
F
4

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.

Foreknow answered 26/12, 2019 at 8:20 Comment(0)
M
3

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 : 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.

Mockheroic answered 20/3, 2014 at 20:2 Comment(4)
Changing the port number does not solve the problem for me.Ell
I had this problem and was fiddller using the same portReno
Changing the port number fixed this for me +1Braw
Change the port number of project and fixed problem for me. Thanks :*Vinna
A
2

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.

Aquaplane answered 1/6, 2016 at 11:11 Comment(0)
N
2

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

Nauseating answered 10/5, 2018 at 15:36 Comment(1)
After trying everything, including adding and removing the urlacl with the netsh command, and deleting the .vs folder, I was ready to reinstall IISExpress when I got this solution to work for me. This was not the first time it happened and the removal of the urlacl resolved my first instance, but not this time around. Thank you @Serge and I will keep this on a permalink.Pollux
N
1

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.

Nickeliferous answered 28/4, 2015 at 18:55 Comment(0)
A
1

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.

Awhile answered 18/3, 2016 at 14:56 Comment(0)
M
1

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

Merrie answered 1/6, 2017 at 0:7 Comment(0)
P
0

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!

Print answered 9/1, 2015 at 13:10 Comment(1)
Good point for create "Pre-requirements" - better for contribution like this is comments - you can still get point if it is valuable. :-)Clemence
O
0

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.

Occlusion answered 19/11, 2015 at 6:45 Comment(0)
F
0

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.

Frater answered 10/2, 2016 at 14:42 Comment(0)
E
0

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.

Ecbatana answered 20/9, 2016 at 12:20 Comment(0)
C
0

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.

Conveyancing answered 26/9, 2016 at 20:39 Comment(0)
P
0

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

Pratt answered 13/11, 2019 at 17:40 Comment(2)
maybe after 6 years they have fixed it :-)Clemence
@BgBruno it's possible. are you ok now :)?Pratt
W
0

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

Waterborne answered 23/7, 2021 at 8:31 Comment(0)
M
0

i created a new solution and imported the projects.

Mashe answered 8/9, 2021 at 8:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.