Unhelpful error if variable is not defined for IIS binding Enabled

Hi guys,

I found my error fairly quickly by redeploying with OctopusPrintVariables and OctopusPrintEvaluatedVariables but I think you might agree that telling me that the variable was not defined would be better than this stack trace:

    System.FormatException: String was not recognized as a valid Boolean. 
			   at System.Boolean.Parse(String value) 
			   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext() 
  Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature.EnsureCertificatesUsedInBindingsAreInStore(VariableDictionary variables) 
			   at Calamari.Deployment.Features.IisWebSiteBeforeDeployFeature.Execute(RunningDeployment deployment) 
			   at Calamari.Deployment.Conventions.FeatureConventionBase.ExecuteFeatureClasses(RunningDeployment deployment, String feature) 
			   at Calamari.Deployment.Conventions.FeatureConventionBase.Run(RunningDeployment deployment) 
			   at Calamari.Deployment.ConventionProcessor.RunInstallConventions() 
			   at Calamari.Deployment.ConventionProcessor.RunConventions() 

In our case, the variable we’d defined to conditionally add an extra binding using the host name of our test server was only set for our non production environments (DEV and QA). When we tried to deploy to UAT we got the error above.

To put this in perspective, the total time spent on working out what I’d done wrong was about 30 minutes. But if it’s possible to give a more friendly message like
“#{Wasp.Web.Bind.Hostname} cannot be converted to Boolean True or False” it would save time.


Hi Darryl,

Thanks for contacting us. Yes that’s not a good error to show for a missing variable. Usually we check up-front for variables before running the deployment, so it shouldn’t have even gotten this far.

I’ll try to reproduce the problem locally, and hopefully we can fix this quickly. Thanks for reporting it to us.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.