Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure the port number of IIS Express to another port other than 8080.

I've seen numerous other posts on this topic, but none that solves my problem (and I'm pulling my hair out trying to get this working!). I'm trying to create a simple one-page website in VS2013 (windows 8.1) and view the page in Firefox and I can't do it - I get "Unable to launch IIS Express Web Server"

Then I get an error message from IIS Express that says "The specified port is in use: Port 8080 is already being used by process IIS Express (process ID '6332') Recommendations: 1. Try switching to a port other than 8080 and higher than 1024. 2) Stop the application that is using port '8080'"

When I click on the Open Log File link I get:

Failed to register URL "http://localhost:8080/" for site "WebSite1" application "/".     Error description: Cannot create a file when that file already exists. (0x800700b7)
Failed to register URL "http://localhost:63997/" for site "WebApplication2"         application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
Failed to register URL "http://localhost:64532/" for site "WebApplication3" application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
Registration completed

I tried uninstalling IIS Express and VS 2013 and then reinstalling VS 2013. I even uninstalled VS2010 which was also on my machine. I've also tried changing the Project URL to use port 8090 and that doesn't help either.

Please help!

like image 450
Ben_G Avatar asked Apr 16 '14 22:04

Ben_G


People also ask

How do I change the port number for IIS Express?

In Solution Explorer, right-click the name of the web application and select Properties. Click the Web tab. In the Servers section, under dropdown selection for IIS Express, change the port number in the Project URL box. To the right of the Project URL box, click Create Virtual Directory, and then click OK.

What port does IIS Express use?

By default IIS Express uses port 8080, but you can use any HTTP port you like. You can also run these from the WIndows Command line in the Web Connection install folder by running Console.exe .

How can I change port number in asp net?

In Solution Explorer, click the name of the application. In the Properties pane, click the down-arrow beside Use dynamic ports and select False from the dropdown list. This will enable editing of the Port number property. In the Properties pane, click the text box beside Port number and type in a port number.

How do I connect to port 8080 in IIS?

To configure the default IIS website to use port 8080. On the Windows desktop, click Start, click Administrative Tools, and then click Internet Information Services (IIS) Manager. In Internet Information Services (IIS) Manager, in the Connections pane, expand the computer name, expand Sites, and then click Default Web Site.

How do I configure IIS Express to use port 80?

On Windows XP, run the following command from an elevated command prompt: After configuring HTTP.sys, you can configure IIS Express to use port 80 by using WebMatrix or Visual Studio 2010 SP1 Beta, or by editing the applicationhost.config file to include the following binding in the sites element.

How to update IIS server port number?

You can also update the WAMP port, referring to my blog Follow the below steps to update IIS server port number: IIS Manager will open. click on “Default Web Site” on left hand side. click on “bindings…” from the right side action section. Popup will open with 80 port listed. select it and click the edit button.

Can you configure IIs to use every port between 1- 65535?

you can configure IIS in IIS Mgr to use EVERY port between 1 and 65535 as long it is not used by any other application can you configure skype like this too? ...


1 Answers

I had a similar issue. I was able to run my Project in the debug mode, but non-debug-mode project did not even start because of similar error.

In my situation the problem was that I tried to access the same port number with having standard HTTP connection and secure HTTPS connection.

There are lot of posts indicating that you should edit .../Documents/IISExpress/config/applicationhost file, but that was not working with me, because my Visual Studio Project always rewrote non-working values to the applicationhost file.

Therefore I found the resolution by redefining my Visual Studio Project Properties as follow:

  1. Click: YourWebApp => Properties => Web (tab)

  2. On Servers section, enter Project Url, as example: http://localhost:44301/ Note: Value 44301 has to be something which has to be unique - Not used by any other apps or in the SSL-connections in YourWebApp project

  3. Click YourWebApp in the Solution Explorer.

  4. Press F4 to open YourWebProject properties. On Development Server section check SSL Enabled property and SSL URL property. If the SSL enabled property is set as True, then YourWebApp uses the URL and port defined in the SSL URL field. Also this url + port has to be unique.

  5. If SSL URL property contains the same port number than defined in step 2 ( https://localhost:44301/), then you have one port assigned both for HTTP and HTTPS connections, and that is not allowed. Then you have either change the port number as unique either on the Project URL or in the SSL URL

like image 160
Petri Avatar answered Sep 17 '22 23:09

Petri