Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Note: You can install mirroring only on Episerver CMS 7.5 (through the Deployment Center). If you want mirroring with the latest Episerver 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 9.
Note: Episerver CMO and Episerver Commerce do not support mirroring. Also, content mirroring is not supported in a cloud deployment such as Windows Azure Web Apps and Episerver Digital Experience Cloud (DXC).
The Monitoring Server monitors mirroring jobs. When you start a mirroring job, the Mirroring Source Server sends an event (MirroringStatusEventArgs) for the state changing of the mirroring job to the monitoring server. A subscriber can follow mirroring states from start to end.
Mirroring job | State |
---|---|
MirroringJobInitialized | Sent after a mirroring job is initialized. |
MirroringPackageInitialized | Sent after a mirroring package is initialized (info about the package is also send). |
Transfering | Sent during transferring of a mirroring package. |
Transferred | Sent when the mirroring package is transferred. |
MirroringPackageCompleted | Sent when the package was imported. |
MirroringJobCompleted | Sent when the last package is imported and the entire mirroring job is finished. |
ExportingError | Sent if an error occurs during export. |
TransferingError | Sent if an error occurs during transfer. |
ImportingError | Sent if an error occurs during import. |
Event | Description |
---|---|
MirroringStatusEventArgs | Contains a GUID which is the mirroring job ID and a MirroringTransferData. |
MirroringTransferData | Contains MirroringInitializeData, MirroringPackageBody, MirroringPackageHeader and MirroringStatus. |
MirroringInitializeData | Contains Name, DestinationPageGuid, DestinationPath, DestinationRoot, LastExecution, NrOfFilesinPackage, NrOfPagesInPackages and so on. |
MirroringPackageHeader | Contains FileSize, TargetFilePath, SizeOfSentData, SizeOfReceiveData. |
MirroringStatus | Contains MirroringState and StatusLog (contains information about Processing, Warning and Error). |
Monitoring mode | Description |
---|---|
Offline Monitoring | The Mirroring Server by default logs states of a mirroring job as an XML file under C:\MirroringMonitoringData\. The filename starts with a unique ID and timestamp. In the CTP version, this mode is always on; it cannot be configured. The XML file contains a list of MirroringStatusEventArgs. |
Online Monitoring | The Monitoring server sends events to subscribers online. |
The Monitoring Server is based on Windows Communication Foundation (WCF) Duplex Communication channel and you can configure it in the config file. The Monitoring Server is integrated with the Mirroring Server 2.0 and the installation program configures it to use port 80 by default.
<service
name="EPiServer.MirroringService.MirroringMonitoringService.MirroringMonitoringServer"
behaviorConfiguration="DebugServiceBehaviour">
<endpoint
address="~/SitePath/MirroringMonitoringServer.svc"
name=""
binding="wsDualHttpBinding"
bindingConfiguration="wsDualHttpBinding_MirroringMonitoringBinding"
contract="EPiServer.MirroringService.MirroringMonitoring.IMirroringMonitoringEventSystem" />
</service>
<client>
<endpoint
name=""
address="~/SitePath/MirroringMonitoringServer.svc"
binding="wsDualHttpBinding"
contract="EPiServer.MirroringService.MirroringMonitoring.IMirroringMonitoringEventSystem" />
</client>
A custom subscriber can use the MirroringMonitoringClient helper class and receive events through the MirroringTransferStatusEventHandler. You also can subscribe to a specific mirroring job through the Subscribe (GUID contextId) method, or for all mirroring jobs through the Subscribe() method.
To subscribe against the monitoring server, create an instance of MirroringMonitoringClient endpointName in app.config.
MirroringMonitoringClient mom = new MirroringMonitoringClient(endPointName); //Client endPointName
To receive Mirroring events or to be notified from the Monitoring Server, the application has to add a handler to the MirroringTransferStatusEventHandler event.
mom.MirroringTransferStatusEventHandler += new MirroringStatusEventHandler(TransferEventCatcher);
Mirroring 2.0 ships with a simple example of the Monitoring WinForms application which lets you view both online and offline logs.
Last updated: Sep 21, 2015