When using the Client.StartExport command with the Core Service ImportExport client with the BasicHttp binding it works OK the first time, but a second action with the same Client in the Opened state fails.

However, if Fiddler is running on the machine it works fine. I've seen this article where running fiddler fixes the App and I'm wondering if I'm having the issue where the HTTPWebRequest is not closed? I get stuck in the state != ProcessState.Finished part. Any ideas?

var test = Client.TestConnection();

Debug.WriteLine("Connection: " + test);

Debug.WriteLine("Starting export: " + name);
// first export...
var exportInstruction = new ExportInstruction()
    LogLevel = LogLevel.Normal,
    BluePrintMode = BluePrintMode.ExportSharedItemsFromOwningPublication,
    ExpandDependenciesOfTypes = IncludeDependencyTypes
var selection = new Selection[] { new ItemsSelection(elements) };

_processId = Client.StartExport(selection, exportInstruction);
Debug.WriteLine("Export Process Started: " + _processId);

var state = WaitForProcess();
var result = GetProcessInfo();
if (state != ProcessState.Finished)
    throw new Exception("Export process Aborted!");

1 Answer 1


for us, we are using the below after the state is finished.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.