Can't change the port in Visual Studio 2015 Community Edition - visual-studio

MSDN says there should be an option in the Properties pane to change the port. There isn't.
How can you change the port of your local web server in Visual Studio 2015 community edition?
EDIT: I believe part of the problem may be that I'm doing a web site projet, not a web application project and those are different for how they allow you to access ports.
The bottom line is, I can't start up the server because something is using the same port.

The option doesn't exist in the enterprise edition either. It seems to be stored in
[My Documents]\Visual Studio 2015\Projects[Your Web Site Name].vs\config\applicationhost.config
You should search for the current port number and replace it.

Bases on #levininja's comment, I managed to solve the error by following the below instructions:
Open visual studio solution file *.sln in your project folder and look for:
VWDPort = "54638"
The default port number may be different than mine. In my case it is 54638.
Change the port to the port number you want.

Related

vstfs:// protocol tries to open in VS 2012 but fails

I have VS 2012, 2015, & 2017 installed on my machine. We also have TFS 2017 locally installed. When I get an email for a code review and click the link, for everyone else it opens up VS 2015/2017 depending on the version the other people have. For me it opens VS 2012 but fails to open up the code review. I noticed if I copy and paste that vstfs//codereview/request/... link in IE it prompts me to open an external application. In this prompt it says:
Do you want to allow this website to open a program on your computer? It then shows Program: Vs 2012 and Address: vstfs:///.... For other people under the Program setting it shows the VS selector and not a specific version.
Does anyone know where I can change this setting to use the VS selector program vs VS 2012 with this vstfs:// protocol link?
Go to the Windows settings (Default App Settings in Windows 10).
Choose Default Apps By Protocol at the bottom of the screen.
Find the VSTS/TFS protocol handler. Set it to the Visual Studio web protocol handler.
You'll have to pick the right version by the icon (if multiple are registered). Unfortunately, the title doesn't contain the version number.

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

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?
SOLUTION
This means that you are missing the right for using it. Create it with Netsh Commands for Hypertext Transfer Protocol > add urlacl.
Open "Command Line Interface (CLI)" called "Command shell" with Win+R write "cmd"
Open CLI windows like administrator with mouse context menu on opened windows or icon "Run as administrator"
Insert command to register url
netsh http add urlacl url=http://{ip_addr}:{port}/ user=everyone
Note
For remove you can use: netsh http delete urlacl url=http://{ip_addr}:{port}/
If not work restart Microsoft Windows (WIN) and then open project and build again.
Sometimes these symptoms may be the same like "Unable to launch the IIS Express Web server”.
Delete autogenerated config files on the project folder.
Close Visual Studio projects.
Delete .vs folder on project folder that includes applicationhost.config file.
Visual Studio will generate a new config for this project.
Opening Visual Studio as administrator will fix the problem.
I solved the error by changing the port for the project.
I did the following steps:
Right click on the project.
Go to properties.
Go to Server tab.
On tab section, change the project URL for other port, like 8080 or 3000.
Good luck!
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
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 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.
Worked for me in VS2003 and VS2017 on Windows 8
Run the command in CMD with admin rights
netsh http add iplisten ipaddress=::
Then go to regedit path [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP\Parameters] and check if the value has been added.
For more details check https://www.c-sharpcorner.com/blogs/iis-express-failed-to-register-url-access-is-denied
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.
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.
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.
I solved this by restarting my computer. I'm guessing that this port was being occupied by a process that needed to be killed.
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!
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.
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.
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.
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.
Just update Visual Studio, this is the simplest solution that worked for me.
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
i created a new solution and imported the projects.

IIS Express Web Server - (Every) Port is in Use?

Today I installed VS2010 SP1 Beta, and IIS 7 Express, as I currently have IIS5 on my local development machine and thought I'd try IIS Express out.
I have gone into the properties window for my Web Application, checked the 'Use IIS Express' checkbox, created the Virtual Directory when it has prompted me, but then get the message "Unable to launch the IIS Express Web Server. Port x is in use".
I have tried changing the port number from the default value that was in there, to numerous other port numbers, but whatever value is there, I am always getting this message, and am therefore unable to use the IIS Express Web Server.
Does anyone know what the problem might be, and how to get around it?
If you are using ESET NOD32 Anti Virus, you need to change the setting of "Web access protection" => HTTP, HTTPS => Web browsers => red cross the check box of your devnev.exe (This is three state checkboxs, click the check box until red cross appeared)
I have just installed VS 2010 SP1, using the above setting to tell NOD32 to leave 'IIS Express' alone.
Reference: http://weblogs.asp.net/anasghanem/archive/2009/02/01/nod32-antivirus-is-blocking-visual-studio-built-in-development-server.aspx
What version OS are you using?
Are you able to start IIS Express from command line? Could you try the following and post the error message you are seeing.
Remove IISExpress directory located under 'My documents' folder
Go to IIS Express installation folder '%programfiles%\IIS Express' (on 64-bit machine '%programfiles(x86)\IIS Express') and try to start iisexpress.exe from command line (without passing any arguments)
I had a similar problem. It seems that if IIS Express is already running a particular site and then you try to run a project that uses that site through Visual Studio it isn't able to attach the debugger. The solution was to close any running instances of IIS Express and WebMatrix and then try running the site through Visual Studio (F5).
I recommend installing WebMatrix as it's the simplest way of managing the sites and port numbers that you are using.
I have the same problem in the visual studio 2012.
I am creating a sharepoint app for the SharePoint 2013 and it happened after some days means it was working before then I got the error:
" Unable to Launch IIS web Server " "port 62308 in use.
To fix this I just went to the settings of the web project by right clicking on the project node in in right panel under the project solution tab. Change the port number and configure the virtual directory and it worked for me.
Hope it work for anyone else in case he/she has any problem.
1- Close Visual Studio.
2- Delete IIS Express folder in Documents or edit applicationhost.config:
<bindings>
<binding protocol="http" bindingInformation=":8080:localhost" />
</bindings>
3- Delete solution file.
4- Start Visual Studio and use open website.
5- Choose your website folder.
If any body still facing the same issue ... even after trying all the above steps
try the following simple steps...
1) close all other applications
2) Download TcpView application from
http://technet.microsoft.com/en-gb/sysinternals/bb897437.aspx
3) run the application, check the localport column and see who is using that specific port
and end that task
That will solve your problem ... :)
go to solution explorer, right click on the present Application then go to properties, now click on web scroll the mouse and change the port no. from project localhost:1257
NOW RUN IT...

IIS Express with VS2010 SP 1 beta problem

I have installed VS2010 SP1 and IIS Express Beta. Both are installed correctly, but I can't use them because the option does not appear in the context menu as Scott Guthrie describes on his blog here:
http://weblogs.asp.net/scottgu/archive/2011/01/03/vs-2010-sp1-beta-and-iis-developer-express.aspx
What am I doing wrong? What should I do to activate IIS Express?
Final version of IIS Express has been released last week. You didn't mention which Beta are you using, but you would be better off with the final version.
Your Visual Studio 2010 SP1 version (as shown in the Help/About) should be 10.0.31118.1 SP1Rel.
You could check if IIS Express works on it's own by going to it's installation directory (in Program Files and trying to run iisexpress.exe (should start a sample site WebSite1 on port 8080).
“Converting your existing projects to use IIS Express is really easy. You can do this by opening up the project properties dialog of an existing project, and then by clicking the “web” tab within it and selecting the “Use IIS Express” checkbox.” — do you have that checkbox?

Visual Studio 2010 Specific port is modified!

In my ASP.NET MVC Application project, I set the option "Specific port" and set it to 80, but the VS 2010 always chooses a differnt random port number of me.
What do I do to make it keep the port I selected?
See this thread Fabio:
Visual Studio 2010 debug in a fixed port
The solution for this particular problem was using a different port. I managed to use the 80 port through IIS, but that was another option.

Resources