Sample how to set up mirroring 2 (delivered with EPiServer CMS version 6 and later)
Read the following articles first
Mirroring 2 tech note from EPiServer Mirroring - MonitoringBlogs
A blog post of an overview of Mirroring 2Continuous MirroringMirror other than contentCustom Export – Handle your "own" streamCustom Mirroring Transfer Provider on USBMirroring and Monitoring ConfigurationsMonitoring On Mirroring ServerCatch Monitoring Event inside CMSTroubleshoot mirroring 2Logging for miroringInstallation
With Deployment center install mirroring on both the source and the remote site.
IIS manager
If just testing mirroring on same machine:
Change the created IIS web sites for both the source and the target sites so it uses port 80 and a host header instead
Web.config
On the source site change the service endpoints to the new values (so we will be able to comunicate with it)
<site root>/MirroringService/web.config
<services>
<service...
<endpoint address="http://<source mirroring site>/MirroringSourceServer.svc"...
</service>
<service...
<endpoint address="http://<source mirroring site>/MirroringTransferServer.svc"...
</service>
<service...
<endpoint address="http://<source mirroring site>/MirroringMonitoringServer.svc"...
<endpoint address="mex"...
</service>
</services>
Change the sites web.config so the site cans communicate with the service
<client>
...
<endpoint name="mirroringSourceEndpoint" address="http://<source site>/MirroringSourceServer.svc"...
<endpoint name="mirroringMonitoringEndPoint" address="http://<source site>/MirroringMonitoringServer.svc"...
On the target site change the service endpoints to the new values (so the source mirroring service will be able to communicate with it)
<site root>/MirroringService/web.config
<services>
<service...
<endpoint address="http://<target mirroring site>/MirroringSourceServer.svc"...
</service>
<service...
<endpoint address="http://<target mirroring site>/MirroringTransferServer.svc"...
</service>
<service...
<endpoint address="http://<target mirroring site>/MirroringMonitoringServer.svc"...
<endpoint address="mex"...
</service>
</services>
Change the sites web.config so the site cans communicate with the service
<client>
...
<endpoint name="mirroringSourceEndpoint" address="http://<target mirroring site>/MirroringSourceServer.svc"...
<endpoint name="mirroringMonitoringEndPoint" address="http://<target mirroring site>/MirroringMonitoringServer.svc"...
Copy all assemblies that contains custom properties to the /bin folder of both mirroring services
Add all assemblies to the bin folder
Sense the mirroring functionality is based on import/export functionality – all page types has to exist on both the source and the destination mirroring services.
The easiest way of solving this is to add all assemblies to the bin folder of the mirroring service.
Test the configuration by:
Create a target page on the target site
Creating a channel with
URI set to http://<target mirroring site>/MirroringTransferServer.svc
Start page to a page on the source site that you will transfer to the target site
Rot page at destination to the page you created
Save the channel
And click "Check system"
In the Messages tab you should get an OK in the status field
Only CMS 6 (without service packs)
Enable remote events so the mirroring service can update the cache of the target server
Add a default service registration to avoid "#49896, Events System: Event Site not registered if WCF client section is empty or missing"
<configuration>
<system.serviceModel>
<services>
<service name="EPiServer.Events.Remote.EventReplication">
<endpoint name="RemoteEventServiceEndPoint"
contract="EPiServer.Events.ServiceModel.IEventReplication"
binding="customBinding"
bindingConfiguration="RemoteEventsBinding"
address="soap.udp://239.255.255.19:5001/RemoteEventService" />
</service>
<configuration>
<system.serviceModel>
<bindings>
<customBinding>
<binding name="RemoteEventsBinding">
<binaryMessageEncoding />
<udpTransport multicast="True" />
</binding>
</customBinding>
Enable remote event in episerver.config file on the target site
<configuration>
<episerver>
<sites>
<site>
<siteSettings enableEvents="true" enableRemoteEvents="true" eventSubscriberUrl="net.pipe://PublicTemplates/EventSubscriber">