Using Alternate Names when Switching

If you have deployed your AB Suite system with an alternate name and it is being switched to at runtime, then in addition to adding the “AltNameFor_<Segment name>” entry in Web.config (as described in “Using Alternate Names”), you must also add an entry named “SysNameFor_<Alternate name>”. This allows the MVC Client application to resolve the system name from an alternate name that is sent back by the runtime system when a Switch occurs.

For example, if you have two systems being switched between (Sample and Demo) and they both have been deployed using alternate names (ALTSample and ALTDemo), then your Web.config file should contain the following entries:

<add key="SystemName" value="Sample" />
<add key="AltNameFor_Sample" value="ALTSample" />
<add key="AltNameFor_Demo" value="ALTDemo" />
<add key="SysNameFor_ALTSample" value="Sample" />
<add key="SysNameFor_ALTDemo" value="Demo" />

Notes:

  • The “SystemName” key defines the initial system being connected to in a multiple system MVC application where switching can occur.

  • The AltNameFor_<Segment name> key defines the alternate name specified for the Segment and is used as the component name being connected to.

  • The SysNameFor_<Alternate name> key defines the system name for an alternate name. This is used by the MVC Client application to resolve the system name from an alternate name that is sent from the runtime system during a switch operation.