Hi I have the following XML configuration which I would like to set a connectio string based on the machine name of the server i place the code on, but with SM 2.6.1, it doesnt ever seem to apply the LiveSettings profile, can someone tell me what I am doing wrong?
<?xml version="1.0" encoding="utf-8" ?>
<StructureMap MementoStyle="Attribute">
<Assembly Name="MyAssembly.Core" />
<DefaultInstance
PluginType="MyAssembly.Core.IDataConnection,MyAssembly.Core"
PluggedType="MyAssembly.Core.DataConnection,MyAssembly.Core"
Scope="PerRequest"
connectionString="Data Source=MYDEVDBSERVERNAME; Database={0};Integrated security=SSPI;Application Name=MyApp" />
<AddInstance
Key="LiveConnectionString"
PluginType="MyAssembly.Core.IDataConnection,MyAssembly.Core"
PluggedType="MyAssembly.Core.DataConnection,MyAssembly.Core"
connectionString="Data Source=MYLIVEDBSERVERNAME; Database={0};Integrated security=SSPI;Application Name=MyApp" />
<Profile Name="LiveSettings">
<Override Type="MyAssembly.Core.IDataConnection,MyAssembly.Core" DefaultKey="LiveConnectionString"/>
</Profile>
<Machine Name="MYLOCALMACHINE" Profile="LiveSettings"/>
</StructureMap>
PS: I have this type of XML configuration using PluginFamily working fine with SM 2.5.3
Thanks, Mark