Ricky
Ricky

Reputation: 35983

Update IIS binding in configuration file, not GUI

Can I update IIS binding in configuration file? I have six servers, needing to sync bindings among them.

Do you have any idea to facilitate my task? Thanks.

Upvotes: 2

Views: 3500

Answers (1)

AvkashChauhan
AvkashChauhan

Reputation: 20576

You sure can use Bindings/Binding element in the web server's ApplicationHost.config (not Web.Config) to setup multiple bindings directly similar to as below however be sure to keep the setting site specific so bindings reflect correct setting to specific site:

<site name="Contoso" id="2">
  <application path="/" applicationPool="Contoso">
     <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
  </application>
  <bindings>
    <binding protocol="http" bindingInformation="192.168.0.1:443:www.contoso.com" />
    <binding protocol="https" bindingInformation="*:443:" />
  </bindings>
</site>

More info: http://www.iis.net/ConfigReference/system.applicationHost/sites/site/bindings/binding

Upvotes: 3

Related Questions