IIS bindings - bind port variable

Hi,

I tried to bind port with variable, as visible in attached screenshot, but it’s not currently possible.
It would be nice addition to allow use of custom expressions for port, e.g. front-end project may need URL to API hosted on IIS, so we pass variable from Octopus there, but we can’t use this variable with IIS deployment.

Hi,

Thanks for getting in touch! I’m sorry to hear you’re hitting this snag binding a variable to your port value. The example in your screenshot looks good. How do you have your variable defined? I’ve attached a couple of screenshots showing my setup, where I have port 80 used when deploying to Development, and port 463 used when deploying to my Staging environment. The variable values get evaluated correctly when deploying to each environment.

If you’re still seeing this issue, could you attach a screenshot of your variables?
Could you also attach a verbose deployment log with debugging variables enabled so we can take a closer look? Check out our documentation page with a guide to get this log.
https://octopus.com/docs/how-to/how-to-turn-on-variable-logging-and-export-the-task-log

I look forward to hearing back!

Best regards,

Kenny

Hi,

It’s weird, but I added this binding with variable once again and now it works correctly.
Yesterday I also inputted port manually, binding didn’t work as well, there was no binding in IIS. I deleted binding and added it again and then it worked.
I had similar problem in a past with “Install to” field in Custom install directory, there was some error during deployment, but after deleting and entering path again, it worked.

I can’t reproduce these problems currently, but next time I see something similar, I’ll add log with variable logging.

Hi,

Thanks for following up. It’s great to hear it’s working correctly now! Let me know if you run into any issues in the future or have any other questions. :slight_smile:

Best regards,

Kenny