Deploy to IIS question - one step, multiple bindings

Hi All,

I have a question about the Deploy to IIS process step.

In our dev, test, acceptance and prod we have different URL’s for dev.xxx, test.xxx etc

Is there a way to only one one step which sets the bindings based on the environment it’s deploying too? Right now I have copied the step 4 times and set the step to run in the respective environments but for ease of use and to have my projects look cleaner I’d like to be able to only have 1 step which takes the different URL’s into account based on the environment. Is there a way to acheive this?

Thanks,

I had done this in the past using a couple of different ways. first if the number of bindings between environments are same then its pretty straight forward, just use variables and scope them out per environment with the binding values. and in the step just use the variable instead of actually putting the binding.

the other is if you have different number of bindings per environment, you can use PowerShell to do an if-then-else and variables, both user defined and system ones.Its a little tricky but it can be done.

Now if you have hundred’s of bindings with different numbers between env then I would just stick with the multiple steps.

Thank you Sohail for helping out. You list of options covers everything what can be done in this case.

Donald, please let me know how you go.

Regards,

Pawel

Thanks both.

The only difference between the bindings is the URL and the password for the IIS account. I’ll give the variables a go. I wasn’t sure that variables could be used in the bindings so I’ll give them a go.