Hi Mark,
As I've mentioned in our ticket... this scenario is not officially supported at the moment.
Currently, in Kentico 8.1, you may try using code similar to the below one, please note that it is not fully tested and our developers are working on other apporaches for the next version.
try
{
string connStringPrefix = "External"; // Prefix for connection string
string connString = connStringPrefix + ConnectionHelper.DEFAULT_CONNECTIONSTRING_NAME;
CMSStatic.CurrentContext = connString;
CacheHelper.CurrentCachePrefix = connString;
ConnectionHelper.ConnectionStringName = connString;
ConnectionHelper.ConnectionStringPrefix = connStringPrefix; // Use API against external DB
}
finally
{
CMSStatic.CurrentContext = null;
CacheHelper.CurrentCachePrefix = null;
}
And in the web.config add connection string to the other database as well:
<add name="ExternalCMSConnectionString" connectionString="..." />
Best regards, Martin