Globalisation and other web.confg settings

Hi,
I am currently attempting to setup a multi-tenant deployment for over 200 tenants.
Thus far I have been able to use a combination of tenant and environment variables to replace AppSettings and ConnectionStrings.
I am also using XML transforms per environment to apply any web.config changes specific to the environment.
Further to this I also have an Additional transform setup as follows so that I can have a transform specific to an individual tenant as well. This is to be used in the rare case when a client overrides a setting so in general not every client would have this transform populated.
Web._#{Tenant.Alias}.config => Web.config

My question is whether it is possible to run an additional transform based upon a tenant key?
For instance I may have 20 Australian clients with their culture set as follows

another 40 may be US

Whilst I can setup individual transforms per tenant to do this OR assume it based upon the environment (which doesn’t work as US and Canadian clients are in the same environment) I was hoping to setup a transform per region and then setup a tenant variable which is of type dropdown list for culture. Which item they select would trigger that particular transform

I am looking at using Substitute variables in files to see if it will work for me.
I will post back if I get it solved.

Great product by the way, I have been eagerly awaiting this release.

Matt

Hi Matt,

Thanks for getting in touch. I’m glad you’ve found your way through the multi-tenant features thus far. I think the easiest way through this problem would be a combination of Substitute variables in files and Config Transforms with a sprinkling of tenant-tag-scoped variables.

My thinking is:

  1. Create a Tenant Tag Set called Globalization, and add each of your cultures as a Tag.
  2. Create a library variable set called Globalization, and add a variable called Culture for each culture, and scope each variable to the matching Tenant Tag.
  3. Tag each of your tenants appropriately and the Culture variable value will be set appropriately for each tenant.
  4. Use the substitute variables in files and/or config transforms (whatever makes you happy) to update the config file using the Culture variable.

I think that would be a winning combination for you. If not, feel free to get back in touch so we can work out a good solution. :slight_smile:

Hope that helps!
Mike

Thanks for the prompt reply Mike I really appreciate your assistance.
I have noticed that the variable substitution occurs before the transforms so have setup a Web.Octopus.config with the following and use substitution variables on it to set the culture and add custom appSettings. I am using Configuration Variables to replace existing appConfig values but in some cases need to be able to insert additional ones specific to particular tentants.
This transform is then applied after the Web.Release.Config

<appSettings>
  #{Tenant.CustomAppSettings}
</appSettings>
 <system.web>
   <globalization culture="#{Tenant.Culture}" uiCulture="#{Tenant.Culture}" xdt:Transform="SetAttributes" />
 </system.web>

I do have another query for you but it is in relation to a separate issue so will open a new topic.

Thanks again,
Matt