Изменить порт iis windows server 2016

Эннера - Компьютерная энциклопедия. Обслуживание компьютеров и серверов.

Сервер IIS версии 1.0-2.0

  1. Запустите Regedt32.exe и найдите следующий подраздел реестра:

    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlServiceProviderServiceTypeW3SVC

  2. Найдите номер порта TCP и дважды щелкните его.
  3. Значение по умолчанию (0x50 Hex; 80 десятичных) в списке должно появиться диалоговое окно Редактор двойных СЛОВ. Измените номер порта, который требуется, чтобы служба публикации в Интернете, чтобы прослушать десятичное значение.

    Примечание: можно также выполнить шаги 2 и 3, чтобы изменить следующие службы:

    • MSFTPSVC: Служба публикации FTP
    • GOPHERSVC: Служба публикации Gopher
  4. Закройте программу Regedt32.exe.
  5. Остановите и перезапустите службы IIS с помощью диспетчера служб Интернета.

Сервер IIS версии 3.0

  1. Откройте диспетчер служб IIS.
  2. Дважды щелкните компьютер, соответствующий службе WWW.
  3. На вкладке « службы » измените поле TCP-порт на необходимый номер порта.
  4. Нажмите кнопку ОК.
  5. С помощью диспетчера служб Интернета, остановите и перезапустите службы IIS.

Microsoft IIS версии от 4.0 до 6.0

  1. Откройте диспетчер служб Интернета или диспетчера Internet Information Services (IIS).
  2. При необходимости разверните веб-сервер, который требуется и затем разверните веб-узлы.
  3. Щелкните правой кнопкой мыши веб-узел, который требуется изменить.
  4. Нажмите кнопку Свойства.
  5. Перейдите на вкладку веб-узел .
  6. Измените номер порта TCP в поле TCP-порт (или нажмите кнопку » Дополнительно » для настройки нескольких портов).
  7. Нажмите кнопку ОК , чтобы сохранить изменения.

Microsoft IIS 7.0

  1. Откройте диспетчер служб IIS (IIS).
  2. Выберите веб-узел, который требуется настроить.
  3. В области действий щелкните привязки.
  4. Нажмите кнопку Добавить , чтобы добавить новую привязку узла или нажмите кнопку Изменить , чтобы изменить существующую привязку.
  5. Нажмите кнопку ОК , чтобы применить изменения.

I want to change the port number on which my website runs while debugging from Visual Studio. I am using Visual Studio 2012, and I am using ASP.NET MVC 4 for my projects I want to change the port. Random port or fixed anyone will work just want to change the port.

Ashley Medway's user avatar

asked Jan 18, 2014 at 10:31

Mohit's user avatar

To specify a port for a Web application project that uses IIS Express

  1. In Solution Explorer, right-click the name of the application and then select Properties.
    Click the Web tab.

  2. In the Servers section, under Use Local IIS Web server, in the Project URL box change the port number.

  3. To the right of the Project URL box, click Create Virtual Directory, and then click OK.

  4. In the File menu, click Save Selected Items.

  5. To verify the change, press CTRL+F5 to run the project.
    The new port number appears in the address bar of the browser.

From How to: Specify a Port for the Development Server (archive.org backup here).

dbc's user avatar

dbc

98.7k20 gold badges213 silver badges320 bronze badges

answered Jan 18, 2014 at 10:34

hutchonoid's user avatar

hutchonoidhutchonoid

32.7k14 gold badges98 silver badges104 bronze badges

6

Here’s a more manual method that works both for Website projects and Web Application projects. (you can’t change the project URL from within Visual Studio for Website projects.)

Web Application projects

  1. In Solution Explorer, right-click the project and click Unload Project.

  2. Navigate to the IIS Express ApplicationHost.config file. By default, this file is located in:

    %userprofile%DocumentsIISExpressconfig

    In recent Visual Studio versions and Web Application projects, this file is in the solution folder under [Solution Dir].vsconfigapplicationhost.config (note the .vs folder is a hidden item)

  3. Open the ApplicationHost.config file in a text editor. In the <sites> section, search for your site’s name. In the <bindings> section of your site, you will see an element like this:

    <binding protocol="http" bindingInformation="*:56422:localhost" />

    Change the port number (56422 in the above example) to anything you want. e.g.:

    <binding protocol="http" bindingInformation="*:44444:localhost" />

    Bonus: You can even bind to a different host name and do cool things like:

    <binding protocol="http" bindingInformation="*:80:mysite.dev" />

    and then map mysite.dev to 127.0.0.1 in your hosts file, and then open your website from «http://mysite.dev»

  4. In Solution Explorer, right-click the the project and click Reload Project.

  5. In Solution Explorer, right-click the the project and select Properties.

    • Select the Web tab.

    • In the Servers section, under Use Local IIS Web server, in the Project URL box enter a URL to match the hostname and port you entered in the ApplicationHost.config file from before.

    • To the right of the Project URL box, click Create Virtual Directory. If you see a success message, then you’ve done the steps correctly.

    • In the File menu, click Save Selected Items.

Website projects

  1. In Solution Explorer, right-click the project name and then click Remove or Delete; don’t worry, this removes the project from your solution, but does not delete the corresponding files on disk.

  2. Follow step 2 from above for Web Application projects.

  3. In Solution Explorer, right-click the solution, select Add, and then select Existing Web Site…. In the Add Existing Web Site dialog box, make sure that the Local IIS tab is selected. Under IIS Express Sites, select the site for which you have changed the port number, then click OK.

Now you can access your website from your new hostname/port.

answered Mar 5, 2014 at 18:47

Saeb Amini's user avatar

Saeb AminiSaeb Amini

22.2k8 gold badges75 silver badges76 bronze badges

9

.Net Core

For those who got here looking for this configuration in .Net core this resides in the PropertieslauchSettings.json. Just edit the port in the property "applicationUrl".

The file should look something like this:

{
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:53950/", //Here
      "sslPort": 0
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "index.html",
      "environmentVariables": {
        "Hosting:Environment": "Development"
      },
    }
  }
}

Or you can use the GUI by double clicking in the «Properties» of your project.

Note: I had to reopen VS to make it work.

Richard Garside's user avatar

answered Jun 17, 2016 at 19:02

fabriciorissetto's user avatar

fabriciorissettofabriciorissetto

9,1175 gold badges64 silver badges72 bronze badges

3

Right click on your MVC Project. Go to Properties. Go to the Web tab.
Change the port number in the Project Url. Example. localhost:50645
Changing the bold number, 50645, to anything else will change the port the site runs under.
Press the Create Virtual Directory button to complete the process.

See also: http://msdn.microsoft.com/en-us/library/ms178109.ASPX

Image shows the web tab of an MVC Project
enter image description here

answered Jan 18, 2014 at 12:50

Ashley Medway's user avatar

Ashley MedwayAshley Medway

7,0917 gold badges51 silver badges70 bronze badges

1

If you just want to change the port because it is already in use. Follow the following steps.

In Visual studio

  1. Right-click on Project Node and select Unload Project
  2. Right-click on Project Node and Edit .csproj file.
  3. Search for the following tags and remove them
<DevelopmentServerPort>62140</DevelopmentServerPort>
<DevelopmentServerVPath></DevelopmentServerVPath>
<IISUrl>http://localhost:62116/</IISUrl>
  1. press Ctrl + S to save the document
  2. Right-click on Project Node and load Project

It will work by selecting another port randomly.

For further information. please click

ΩmegaMan's user avatar

ΩmegaMan

28.3k10 gold badges98 silver badges116 bronze badges

answered Oct 2, 2019 at 7:49

Charlie's user avatar

CharlieCharlie

4,7312 gold badges30 silver badges54 bronze badges

Another fix for those who have IIS Installed:

Create a path on the IIS Server, and allocate your website/app there.

Go to propieties of the solution of the explorer, then in front of using the iisexpress from visual studio, make that vs uses your personal own IIS.

Solution Proprieties

Bhargav Rao's user avatar

Bhargav Rao

48.7k28 gold badges124 silver badges139 bronze badges

answered Jan 6, 2016 at 16:18

Alex's user avatar

You can first start IIS express from command line and give it a port with /port:port-number
see other options.

answered Nov 7, 2017 at 15:04

John Henckel's user avatar

John HenckelJohn Henckel

9,7803 gold badges75 silver badges77 bronze badges

If we are talking about a WebSite, not web app, my issue was that the actual .sln folder was somewhere else than the website, and I had not noticed. Look for the .sln path and then for the .vs (hidden) folder there.

answered Jun 11, 2019 at 10:54

Sentinel's user avatar

SentinelSentinel

3,5521 gold badge29 silver badges42 bronze badges

For old Website projects you will need to modify port in solution file, find section similar to below and change «VWDPort» property

Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "My Website", "My Website", "{871AF49A-F0D6-4B10-A80D-652E2411EEF3}"
    ProjectSection(WebsiteProperties) = preProject
        SccProjectName = "<Project Location In Database>"
        SccAuxPath = "<Source Control Database>"
        SccLocalPath = "<Local Binding Root of Project>"
        SccProvider = "Mercurial Source Control Package"
        TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.7.2"
        ProjectReferences = "{41176de9-0c21-4da1-8532-4453c9cbe289}|My.CommonLibrary.dll;{f1fda4e5-0233-458e-97b8-381bdb38a777}|My.Ajax.dll;{e756176c-9cd1-4dac-9b2d-9162b7554c70}|My.WEB.API.Domain.dll;{7A94A6C8-595B-43CF-9516-48FF4D8B8292}|My.WEB.API.Common.dll;{790654F2-7339-472C-9A79-9E36837571A0}|My.Api.dll;{25aa245b-89d9-4d0c-808d-e1817eded876}|My.WEB.API.DAL.dll;{cc43d973-6848-4842-aa13-7751e655966d}|My.WEB.API.BLL.dll;{41591398-b5a7-4207-9972-5bcd693a9552}|My.FacialRecognition.dll;"
        Debug.AspNetCompiler.VirtualPath = "/My Website"
        Debug.AspNetCompiler.PhysicalPath = "My Website"
        Debug.AspNetCompiler.TargetPath = "PrecompiledWebMy Website"
        Debug.AspNetCompiler.Updateable = "true"
        Debug.AspNetCompiler.ForceOverwrite = "true"
        Debug.AspNetCompiler.FixedNames = "false"
        Debug.AspNetCompiler.Debug = "True"
        Release.AspNetCompiler.VirtualPath = "/My Website"
        Release.AspNetCompiler.PhysicalPath = "My Website"
        Release.AspNetCompiler.TargetPath = "PrecompiledWebMy Website"
        Release.AspNetCompiler.Updateable = "true"
        Release.AspNetCompiler.ForceOverwrite = "true"
        Release.AspNetCompiler.FixedNames = "false"
        Release.AspNetCompiler.Debug = "False"
        VWDPort = "3883"
        SlnRelativePath = "My Website"
    EndProjectSection
    ProjectSection(ProjectDependencies) = postProject
        {C3A75E14-1354-47CA-8FD6-0CADB80F1652} = {C3A75E14-1354-47CA-8FD6-0CADB80F1652}
    EndProjectSection
EndProject

answered Feb 12, 2021 at 15:43

user7313094's user avatar

user7313094user7313094

4,2602 gold badges23 silver badges35 bronze badges

For web projects:

  1. Close Visual Studio
  2. Open [projectName].sln in solution root directory using a text editor (like sublime)
  3. Search your current port number you will find 5 instances
  4. Replace them with new port number and save file
  5. Delete .vs file in the solution root directory
  6. Start visual studio then the .vs file will be created again. run the web project it will start with new port

answered Sep 12, 2021 at 5:30

AminFarajzadeh's user avatar

Edit .sln file using an editor like notepad.

Replace All Ports With New Port.

answered Sep 2, 2016 at 8:04

aDDin's user avatar

aDDinaDDin

533 bronze badges

1

I’d the same issue on a WCF project on VS2017. When I debug, it gives errors like not able to get meta data, but it turns out the port was used by other process. I got some idea from here, and finally figure out where the port was kept. There are 2 places:
1. C:…to your solution folder….vsconfigapplicationhost.config. Inside, you can find the site that you debug. Under , remove the that has port issue.
2. C:…to your project folder…, you will see a file with ProjectName.csproj.user. Remove this file.

So, close the solution, remove the and the user file mentioned above, then reopen the solution, VS will find another suitable port for the site.

answered Sep 5, 2019 at 21:22

Huky's user avatar

I’m using VS 2019.

if your solution has more than one project / class libraries etc, then you may not see the Web tab when clicking on Solution explorer properties.

Clicking on the MVC project and then checking properties will reveal the web tab where you can change the port.

answered Nov 21, 2019 at 7:20

Shaakir's user avatar

ShaakirShaakir

4345 silver badges13 bronze badges

Deploy your application in the IIS with the default port. Try to debug it using visual studio. It’s a good practice. If you use visual studio, it will keep changing the port number most of the time. So better deploy the application in the IIS first and Open the same in visual studio and Debug it.

darkenergy's user avatar

answered Jan 18, 2014 at 12:39

Wiki's user avatar

WikiWiki

921 silver badge8 bronze badges

2

I have an apache running on port 80, I want to move my Web Applications to *:8080 But I don’t remember how. I’ve seen this link but Edit Bindings isn’t in my options list. Not even in Basic Settings nor in Advanced Settings.

Heres An image of What I’ve got.

IIS - Left Panel Options

Community's user avatar

asked Jul 11, 2011 at 20:25

apacay's user avatar

1

From How to change the TCP port for IIS services

  1. Open Internet Information Services (IIS) Manager.
  2. Select the Web site that you wish to configure.
  3. In the Action pane, click Bindings.
  4. Click Add to add a new site binding, or click Edit to change an existing binding.
  5. Click OK to apply the changes.

answered Jul 11, 2011 at 20:28

John Conde's user avatar

John CondeJohn Conde

85.9k26 gold badges142 silver badges239 bronze badges

1

If you look at the image you can clearly see

Server/Sites/Default Web Site/A Web Application

In order to bring to the UI the binding option, Default Web Site should be selected and not A Web Application.

You have to change the binding of the whole website, which seems correct. (It has no short term sense that you have two ports for the same webApp)

answered Jul 18, 2011 at 12:27

apacay's user avatar

apacayapacay

1811 gold badge1 silver badge6 bronze badges

For an hour I searched for the solution and it was only the firewall. I suspended it and was then able to log in to Vault in Inventor. I could log in to Vault Explorer no problem, just not from Inventor. Anyway stopping my firewall for a moment was the trick.

answered Jun 16, 2012 at 0:14

Bobby's user avatar

BobbyBobby

111 bronze badge

IIS might not be installed properly.

From this thread…

  • Remove both IIS and Windows Process Activation Service
  • Click Programs and Features in Control Panel
  • Click «Turn Windows Features on or off»
  • Under Features summary, click «Add Features»
  • Now expand out «.NET Framework 3.0 Features) «
  • click «WCF Activation»
  • It will automatically ask you if you want to add the required file service
    roles
  • say «yes»
  • click next select the roles you want.
  • The roles will install, and you will now have the normal IP addresss, port, host
    name, etc. show up

answered Jul 12, 2011 at 19:50

Alex Burr's user avatar

1

For Windows 7 or 8, search For IIS manager then in left pane select default website and select edit the bindings. Choose the port which you want to set.

Simon Hayter's user avatar

Simon Hayter

32.7k7 gold badges57 silver badges115 bronze badges

answered Nov 27, 2013 at 11:07

Amar's user avatar

Я использовал vs2010 и webmatrix. Тем не менее, я пытаюсь использовать apache в последнее время.
Поэтому мой IIS express использует порт 80, а apache использует порт 8080.
Я намерен сделать это наоборот. Пусть apache использует порт 80, а IIS — 8080.
Я не мог позволить апашу слушать порт 80, пока IIS перестанет слушать порт 80.
Как мне настроить порт IIS express?

ps.Я использую win7 с одним IP-адресом

4b9b3361

Ответ 1

Попробуйте это

Чтобы настроить веб-сайт IIS по умолчанию для использования порта 8080

На рабочем столе Windows нажмите кнопку «Пуск», «Администрирование», затем «Диспетчер служб IIS».

В диспетчере служб IIS на панели «Соединения» разверните имя компьютера, «Сайты» и нажмите «Веб-сайт по умолчанию».

На панели «Действия» в разделе «Редактировать сайт» нажмите «Привязки».

В диалоговом окне «Связывание сайтов» щелкните запись http и нажмите «Изменить».

В диалоговом окне «Изменить привязку сайта» в «Порт» введите 8080 и нажмите «ОК».

В диалоговом окне «Связывание сайтов» нажмите «Закрыть».

На панели «Действия» в разделе «Управление веб-сайтом» нажмите «Стоп», а затем «Пуск».

Ответ 2

Microsoft Internet Information Services 7.0

 1. Open Internet Information Services (IIS) Manager. Select the Web.
 2. site that you wish to configure. In the Action pane, click Bindings.
 3. Click Add to add a new site binding, or click Edit to change an existing binding.
 4. Click OK to apply the changes.

Источник — Как изменить порт для служб IIS

Ответ 3

IIS 8.1

  • Выберите «Веб-сайт по умолчанию» из дерева слева в диспетчере IIS.
  • Нажмите «Привязки» с правой боковой панели, чтобы открыть диалоговое окно.
  • Выберите запись «http» из сетки и нажмите «Изменить».
  • Введите свой номер порта в текстовом поле «Порт» и нажмите «ОК».

Ответ 4

Как изменить порт IIS в Windows Опубликовано 21 ноября 2017 г. Сурешем Камруши в Windows [Мне нравится] +2 [В отличие от] 0 Спасибо за ваш голос.

Здесь показано, как вы можете обновить номер порта сервера IIS в системе Windows 10/8. Может быть несколько причин, по которым вы хотите изменить порт, но для меня это WAMP, я использую его для проектов PHP. IIS и WAMP используют один и тот же порт, что затрудняет разработку. Поэтому я обновил порт IIS. Вы также можете обновить порт WAMP, ссылаясь на мой блог. Чтобы обновить номер порта сервера IIS, выполните следующие действия:

  1. Начните и введите IIS
  2. IIS Manager откроется. нажмите «Веб-сайт по умолчанию» на левой стороне.
  3. нажмите на «привязки…» в правой части раздела действий.
  4. Всплывающее окно откроется с 80 портами в списке. выберите его и нажмите кнопку редактирования.
  5. Обновите порт и перезапустите сервер.

источник: http://sforsuresh.in/change-iis-port-windows/

  • Remove From My Forums
  • Question

  • I would like my 2012 server to use port 8080 as my default IIS port instead of port 80.  I have changed the listening port on the default website to port 8080 and restarted the IIS server but my sites are still looking for port 80, I have to use :8080
    with my domain name.  Is there a way to automatically have port 8080 listen to incoming web traffic?  My router is set to listen to port 8080 and forward to my server.  

Answers

    • Edited by

      Monday, March 31, 2014 9:07 AM
      Highlight Main points

    • Marked as answer by
      Dharmesh SMicrosoft employee
      Monday, March 31, 2014 9:07 AM

After installing IIS on any Windows machine, by default IIS Server listens on port 80. The same is true with Windows 8.1. Most of the times, it works fine. However, in some cases, we need to modify this port from 80 to a different port. One of the scenarios where you might need to change this port is if you want to run Wamp side by side your IIS on your local computer. This post will explain how to change the default listening port of IIS from 80 to any other port of your choice.

To change the default port, follow the below steps:

  • Start typing “IIS Manager” on your start screen in Windows 8 and Windows 8.1
  • Select “Internet Information Services Manager” from the search results returned.

    IIS-1

  • Select “Default Web Site” from the left tree in IIS manager.

    IIS-2

  • Click Bindings from the right sidebar to open a dialog box.
  • Select “http” record from the grid and hit Edit.

    IIS-3

  • Enter your choice of port number in “Port” Text box and hit OK.

    IIs-4

  • Hit Close on the parent dialog box to close the window.
  • Select your server node again from the left tree and hit “Restart Server” from the right sidebar to restart IIS server.

    IIS-5

  • You’re done! Go to http://localhost:<YOUR_PORT>/ to browse your IIS at new port.

Thanks for reading this post. Hope you like this. If you have any doubts or know other ways of doing the same, share them via comments.

Понравилась статья? Поделить с друзьями:
  • Изменить положение папки мои документы windows 10
  • Изменить политику паролей windows server 2008 r2
  • Изменить период активности windows 10 что это
  • Изменить переменные среды windows 10 без прав администратора
  • Изменить пароль учетной записи windows server 2016