Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 661219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:14:36+00:00 2026-05-13T23:14:36+00:00

I’m using a staging model with MSDeploy to deploy a couple of our sites

  • 0

I’m using a staging model with MSDeploy to deploy a couple of our sites to a web farm. The sites are configured in IIS on the staging boxes only, and then MSDeploy is used to build the target web servers from scratch.

The staging box uses its own bindings (ie no header entries, different IPs/ports and no host headers) for the sites that will be live. When I deploy them I first have an xml file used to prepare a parameterised package (using the -declareParamFile switch) which declares parameters as follows:

<parameters>
  <parameter name="site1">
    <parameterEntry kind="DestinationBinding" scope="Site1" match=":17000:" />
  </parameter>
</parameters>

So in the above XML you can see that the staged site is hosted on port 17000 as the match attribute is set to match a binding that has that value.

When I then deploy to each live site, I use a different parameters XML that specifies the correct host header and IP for that machine – I apply this using the -setParamFile switch. Here’s an example of one of them.

<parameters>
  <setParameter name="site1" value="[ip_addr]:[port]:[host_header]"/>
</parameters>

So, because the original parameter is declared to match one of the known bindings – I can replace that binding with what I actually want it to be on each live server.

What I want to do now is to deploy the site and add new destination bindings to it that incorporate the different TLDs that we have – i.e. site.com, site.co.uk, site.ca etc, all bound on the same IP address and port.

The reasons for wanting to do this are:

  • We have a new site that we want to deploy that will need a different hostname, but we don’t want to give it it’s own IP address (running out of IPs here!) but have it share the IP that an existing site on the servers already has.
  • This means adding specific hostname bindings to the site that’s already on there, instead of having it respond to any hostname.
  • We have four domain names currently pointing to the existing site’s load balanced IP(.com, .us, .ca, .com.au). At the moment it works because the web server doesn’t care about the host header – but when the new site goes on the same IP, it will, and the other domain names will no longer work.

The problem is I don’t think there appears to be any way of adding such information. I’ve tried adding multiple setParameter elements in the second XML, but that simply has the effect of repeatedly overwriting the binding, with the last one as the eventual winner.

One solution is for me to add ‘placeholder’ bindings for each of the sites on the staging box, which represent the target external bindings for each domain name, port etc; and then I modify the two parameters files to replace those bindings with the real ones.

But to me this feels completely wrong – that would be modelling the staging box to suit the live deployment; it should be the other way around.

Is it possible to actually add site bindings with MSDeploy (if so, how?), or does it only support replacement?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T23:14:37+00:00Added an answer on May 13, 2026 at 11:14 pm

    After much head-banging, it appears that there is no way to add new bindings using the DestinationBinding operation with msdeploy.

    What would be possible would be to attach a script to be executed after deployment that adds the bindings using appcmd every time.

    So, the initial synchronisation via msdeploy would remove those bindings (because they’re not on the staging server) but the appcmd script would then add them again.

    Not really an ideal solution, though, as it’s yet another script that has to be kept up to date.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.