SaaS CMS has officially launched! Learn more now.

CMS 9 & check CurrentITransferContext


Hi all,

I've updated to CMS 9 and the line below, which I use to check that the page is not currently being imported/mirrored during page events, no longer works. 

EPiServer.BaseLibrary.Context.Current["CurrentITransferContext"] != null

Does anyone know what is now the best way to check whether the current context is importing?

Many thanks,


Nov 03, 2015 16:19


It looks like this property was moved to ContextCache.

You could try to use one of two options. Use the CurrentContext static property of ExportImportBase class.

 var transferContext = EPiServer.Enterprise.ExportImportBase.CurrentContext;

or call ContextCache directly.

var transferContext = EPiServer.Framework.ContextCache.Current["CurrentITransferContext"];

The EPiServer.Enterprise.ExportImportBase.CurrentContext has the implementation that executes EPiServer.Framework.ContextCache.Current["CurrentITransferContext"]

Nov 03, 2015 20:01

Just a heads-up, mirroring is obsoleted in EPiServer 9. Please see

Nov 03, 2015 22:09

Thank you Grzegorz! That's exactly what I was looking for.

@Johan, is it actually being made obsolete? I understood it that its just incompatible with previous versions, though I haven't tried it yet. I should be able to try using the updated DLL soon and will report back with any issues.

Nov 04, 2015 15:45

Ah, my fault. Yep seems to still work, just need to update the package since they have moved stuff arround.

Nov 04, 2015 15:49
* 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.