Sitecore 9 Additional Publishing Target
Sitecore 9 Additional Publishing Target
You are usually adding new publishing targets in Sitecore because of different geographic regions or databases in different data centers where you are hosting these web databases.
For a long time, for Sitecore 7 and 8, process for creating new publishing target was more or less the same. You have created new entry in ConnectionStrings.config, added new entry in web.config and added new definition item in master database under “/sitecore/system/Publishing targets” node.
In Sitecore 9 process has been slightly changed. You are not changing web.config anymore but Sitecore.config and 2 additional steps are now involved for adding new publishing target. These two more steps are adding and elements in Sitecore.config.
In my example below, I will use “web_secondary” as name of publishing target database. I will use “QA” as name of publishing target.
Steps to add new publishing target in Sitecore 9:

[caption id="attachment_157" align="aligncenter" width="656"]
publishing targets[/caption]
[caption id="attachment_158" align="aligncenter" width="504"]
publishing targets[/caption]
Source Error:
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0 https://xchangesitecore.com/sitecore-9-additional-publishing-target/ Vikash Raaj
For a long time, for Sitecore 7 and 8, process for creating new publishing target was more or less the same. You have created new entry in ConnectionStrings.config, added new entry in web.config and added new definition item in master database under “/sitecore/system/Publishing targets” node.
In Sitecore 9 process has been slightly changed. You are not changing web.config anymore but Sitecore.config and 2 additional steps are now involved for adding new publishing target. These two more steps are adding and elements in Sitecore.config.
In my example below, I will use “web_secondary” as name of publishing target database. I will use “QA” as name of publishing target.
Steps to add new publishing target in Sitecore 9:
- Create new target database in ConnectionStrings.config where you want content to be published:
- Add new entry in master database under “/sitecore/system/Publishing targets” node.

[caption id="attachment_157" align="aligncenter" width="656"]

- Create a patch file under C:inetpubwwwrootinstancenameApp_ConfigIncludeProject or any other folder based on your setup. I have named my patch config file “PublishingTargets.config” and this is it’s content (you can just copy it and change web_secondary based on name of your secondary web database specified in ConnectionStrings.config):
Download the Publishing Target Patch File
- After applying these changes, you can see now pretty new publishing target in publishing dialog in Sitecore 9:
[caption id="attachment_158" align="aligncenter" width="504"]

- Finally the newly added database must be created manually in SQL Server else Sitecore won’t start and will give you otherwise this nice exception:
Server Error in ‘/’ Application.
One or more exceptions occurred while processing the subscribers to the ‘property:changed’ event.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.AggregateException: One or more exceptions occurred while processing the subscribers to the ‘property:changed’ event.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[AggregateException: One or more exceptions occurred while processing the subscribers to the 'property:changed' event.] |
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.2623.0 https://xchangesitecore.com/sitecore-9-additional-publishing-target/ Vikash Raaj
Comments
Post a Comment