SaaS CMS has officially launched! Learn more now.



This example is taken from the SDK. And the only file it make is file containing 0kb. Anyone know why?

// Create a new exporter  DataExporter Exporter = new DataExporter();  // Create an output stream string exportFile = Path.GetTempFileName(); Exporter.Stream = new FileStream(exportFile, FileMode.Create, FileAccess.Write, FileShare.None);  // Add pages to the export package, here alla pages below the startpage Exporter.SourceRoots.Add(new ExportSource(PageReference.StartPage,      ExportSource.RecursiveLevelInfinity));  // Export all pages Exporter.Export();  // Close the exporter Exporter.Close();  // Close the out file  Exporter.Stream.Close();
Apr 11, 2008 17:39

Hi Svein!

The reason is probably an exception during export. The Export method eats all exceptions and if you have any issues you will se then in Exporter.Log.Errors and Exporter.Log.Warnings.

Fredrik Haglund -

Apr 13, 2008 22:41


I guess the SDK example is incorrect. Possible values for FileAccess are Read and ReadWrite and for FileMode CreateNew and Append.

Exporter.Stream = new FileStream(exportFile, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None);


Marthin Freij
Konstruktor Sweden AB

Sep 30, 2008 15:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.