Questions Regarding Mirroring and DDS


Good Day All!

I have a question.  I have been through literally all of Johan's blog posts about mirroring and extending them, but i do have a question about DDS.  Currently my code is as follows:

    public class DDSExporter : IInitializableModule
        public void Initialize(InitializationEngine context)
            MirroringEvents.SourceStartingJob += delegate(object source, MirroringSourceInitializeEventArgs args)
                DataExporter.Exporting += new EventHandler(DataExporter_Exporting);
        void DataExporter_Exporting(object sender, EventArgs e)
            DataExporter exporter = sender as DataExporter;
            if (exporter.TransferType == TypeOfTransfer.MirroringExporting)
                var ddsHandlerObj = (sender as DataExporter).TransferHandlers.Where(p => p.GetType() == typeof(DynamicDataTransferHandler)).Single() as DynamicDataTransferHandler;

                var store = typeof(PageTypeTab).GetStore();
                var externalID = store.GetIdentity().ExternalId;
                var storeName = store.Name;
                ddsHandlerObj.AddToExport(externalID, storeName);

        public void Uninitialize(EPiServer.Framework.Initialization.InitializationEngine context)
            DataExporter.Exporting -= new EventHandler(DataExporter_Exporting);

        public void Preload(string[] parameters) { }


So my question now is, how can i tell that the DataExporter_Exporting is fired AND how is this handled on the target site.  Do i need to write an importing module as well to handle the dds data.  Anyhelp would be extremely helpful.  Thank you(Gracias, tack, etc.....)

Jun 15, 2011 23:36


Jun 24, 2011 2:16

To see that your event handler is called you could either use e.g. log4net to log. If you run mirroring on a development machine you could also attach your visual studio instance to the w3wp process that runs the mirroring source service (the mirroring service is a wcf service hosted by IIS) and set break points in your code.

You do not need to do anything on the import side.

There are however events availiable on the import side as well if you e.g. need to set/change some value on your object instance before it is saved to DDS.

Jun 27, 2011 14:53
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.