Search code examples
iisbindingazure-devopsazure-pipelines-release-pipelinerelease-management

Why can't I release with a binding on existing port that is shared between several websites?


I am trying to deploy website to the remote machine (IIS Web Deploy).

The destination machine is a dedicated hosting where I have several websites hosted.

The default website has a binding on 80 port. Other websites running as http also have the same port assigned and https have another port but also shared between all websites.

When deploying via via Azure DevOps I have set up a default binding:

http/All Unassigned:80:

and I am getting an error on deploy:

##[error]Binding (http / * : 80 : ) already exists for a different website ("site "default web site" (id:1,bindings:http/*:80:,state:started)"), change the port and retry the operation.

Why does it require another binding for each release definition/ website?

And what does it actually mean "All unassigned"? Shall I specify more ports to choose from?


Solution

  • You are facing the expected error since you are using the default binding and have not stopped the default website on IIS, which also uses the default binding.

    As what you described, the default binding only specifies port 80 and no host.

    BUT, IIS needs to be able to determine exactly the website to which it should forward a request. The bindings for the site should be different from one another. If two sites have the same binding, then only one can run at a time. Or it will cause conflicts. That's why you are receiving such error message.

    So, as normal, the solution of such error message are change a port, stop the default website or adding a host name.

    If you really need these websites to share one port, I'm afraid the only solution is to add a host name:

    enter image description here