Notes
This content applies to Optimizely Content Management System (CMS) versions 10 and 11.
You can install mirroring only on Episerver CMS 7.5 (through the Deployment Center). If you want mirroring with the latest CMS version, install a CMS 7.5 site with mirroring, and then upgrade to the latest CMS through NuGet because there is no NuGet package for mirroring functionality; it is installed as a separate service in a virtual directory on the server. An updated DLL is available in the _EPiServer.CMS.Core NuGet_ package (_packages/EPiServer.CMS.Core.9.0.0/tools/MirroringService/_), which you must manually patch to support CMS 10.
Optimizely CMO and Optimizely Customized Commerce do not support mirroring. Also, content mirroring is not supported in a cloud deployment such as Windows Azure Web Apps and Optimizely Digital Experience Platform (DXP).
Mirroring usually occurs between two sites, so you have to install two sites: one as a source site and one as a target site. You can use each site as a source site or a target site regardless of the purpose from the beginning.
The installation package for CMS contains a setup file (_setup.exe_) that installs the **Deployment Center** and **Optimizely CMS**. Alternatively, you can run **EPiServerShared.msi** and **EPiServerCMS.msi **instead of the setup file.
## Install mirroring on a new website
Open the Deployment Center and select **Install site and SQL Server database** or **Install site without database**, depending on whether you want to use SQL Server as a database. The mirroring part of the site is installed as an application under the site/application with a separate application pool. You can change this manually after the installation if you want to have the mirroring application on a separate site.
**Web server bindings** – Select the site settings and bindings for the site you are creating.
**Creating database** – Select settings for the database to be created.
**Virtual Path Provider Folder** – Select a folder where files will be stored by the Virtual Path Providers.
**Modules** – Select **Install Mirroring** in the module list.
**License file** – Browse to a valid license file. If you do not have a valid license file yet, you can copy the file to the site when received.
**Summary** – Check that the port in **Bindings** under **Site Settings** is 80.
**Credentials** – At the end of the installation, the mirroring module window appears where you select the credentials that are used when you run a mirroring job. These settings are editable from the mirroring configuration file (_web.config_). Enter the username, password, and domain of a user that exports and imports pages and files when you run a mirroring job.
## Install mirroring on an existing website
To install Mirroring on an existing CMS site, the site must be running on the same version as the mirroring DLL (_EPiServer.MirroringService.dll_).
Open the Optimizely Deployment Center, and select **Install Mirroring** to start the installation.
**Choose site** – Choose the site on which you want to install the mirroring application. Only sites installed on port 80 are visible and selectable.
**Credentials** – At the end of the installation, the mirroring module window appears where you need to select the credentials that are used when you run a mirroring. These settings are editable from the mirroring configuration file (_web.config_). Enter the username, password, and domain of a user that exports and imports pages and files when you run a mirroring job.
**Summary** – Displays the settings. Check all settings before continuing with the installation.
## Configure the target site
Create a page that acts as the root page for the mirrored pages on the target site in the CMS editorial interface. You also can use an existing page as the mirroring root page.
## Configure the source site
**Create a channel** – Create and edit channels on the source site for mirroring in the CMS administrative interface.
**Mirror channels** – Start the mirroring process manually, or automatically as a scheduled job, in the CMS admin view.
## Configure web.config
### Change security credentials
To change the security credentials that are used when a Mirroring job is run, open _web.config_ for the source mirroring application. Locate the `episerverMirroring
` element in the configuration file and change the credentials in the **MirroringTransferServer** provider.
Configuration | Description |
`defaultProvider ` | To use a mirroring provider other than the built-in provider, enter the provider in the **episerverMirroring** section and set the `defaultProvider ` to the provider you want to run. |
`numberOfPagesinPackage ` | Indicates the max number of pages in package. Default: **500**. |
`numberOfFilesInPackage ` | Indicates the max number of files in package. Default: **100**. |
`destinationPath ` | When data is sent between the machines, temporary files are stored in the `destinationPath ` location. |
`chunkSize ` | The chunk size of data sent between the machines. Default: **4194304** bytes. |
communication protocol | When the mirroring application is installed, it uses `basicHttpBinding ` by default when communicating between the machines. To change this, change the bindings in the configuration files for both the source and the target application, see [About WCF and Bindings on MSDN](🔗). |
`sourceConnectionStringName ` | The mirroring provider uses the connection string from the connectionStrings section, by default. |
`destinationConnectionStringName ` | The mirroring provider uses the connection string from the connectionStrings section, by default. |
`offlineLoggingEnabled ` | Indicates whether offline logging is enable. Default is disabled (**false**); enable by setting to **true**. |
`offlineLogPath ` | Indicates the path to the offline log. Default is \*C:\\Windows\\Temp\\episerver\\cms6\\mirroring\\monitoring\*. |
### Change the mirroring application to a separate site
The Deployment Center installs the mirroring application as an application under the chosen CMS site. To change the mirroring application to a separate site:
**Add site in IIS**.
Open up IIS and delete the mirroring application under the source and target sites. After the application is deleted, create a new site and set its root folder to the **Mirroring** folder that was created as a sub-folder to the source/target site’s root folder.
Note
This document does not contain information about how to use **WCF** and `
basicHttpBinding
` on another port than 80. For details about configuring namespace reservations using a port other than 80 for WCF application hosted in IIS, see [Microsoft MSDN](🔗).**Change service endpoints**. Open the configuration files, and update both the source and target mirroring sites (`
mirroringSourceEndpoint
` and `mirroringTransferEndpoint
`) to point to the correct address.
## Configure the transfer provider act both source and target provider
Set `sourceConnectionStringName
` and `destinationConnectionStringName
` attributes on the provider to make the mirroring service provider act both as source and target.
## Synchronize mirroring
Synchronize the bin folders both under the site root folder and mirroring service bin folder. When assemblies in the site bin folder and mirroring service bin folder are not same, the following error appears during _Check System_:
You should have both bin folders synchronized with each other, because the Mirroring Service runs as a separate application and has its own application pool. When you add any custom code/property/module under the source site, copy the affected assembly to the Mirroring Service bin folder also. If you installed mirroring service on both source and destination sites, then Site and Mirroring Service must have the same assemblies under the bin folders.