Unable to open solution containing website due to port being less than 1024?

I had the same issue after updating Visual Studio 2017. I opened up each affected project file and removed the contents in the IISUrl and the project reloads correctly. Weird since both UseIISExpress and UseIIS were set to False.

I also tried typetrice's solution and it worked too.


Figured out a solution a while ago, but forgot to post the answer here just in case someone else stumbled across this one day.

If you open the solution file containing the project, you need to remove any instance of 'localhost' where the website in question is referenced. This seems to do the trick.

My guess is VS sees the 'localhost' and assumes you're trying to actually open a site on the local machine, or bind it to that address. Which would explain the port error.


I had this error after upgrading a website from VS 2005 to VS 2012. cDecker32's answer is correct, but I'm adding some supporting details...

The site was declared like this in the VS 2005 sln file:

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "C:\...\EMR\", "EMR", "{6E950F28-C219-492C-B9A3-5480D70475FB}"

VS 2012 changed it during the upgrade to reference localhost:

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "http://localhost/EMR/", "http://localhost/EMR", "{6E950F28-C219-492C-B9A3-5480D70475FB}"

After relaunching VS 2012 with "Run As Administrator" (per the error message's instructions), 'localhost' was removed from the project name, but kept in the path:

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "EMR-Site/EMR", "http://localhost/EMR", "{6E950F28-C219-492C-B9A3-5480D70475FB}"

This allowed the solution to load, but the site failed to run at this point; studio complained that you need admin rights to use ports < 1024. I believe it assumes localhost means IIS on port 80.

Manually renaming the path to "\EMR" in both the Project definition and the Source Control section allowed the site to run as it did in VS 2005.