I'm trying to export Laserfiche volumes to a drive for offsite backup. If I use the RepositoryAccess library, one of my volumes errors out: Laserfiche.HttpClient.HttpException: Error reading HTTP response body. The volume contains a lot of large pdfs. The error doesn't happen on all volumes. I tried a the same export using LFSO104Lib and no error. I'd rather use RepositoryAccess since it appears more straight forward to me. Any ideas on what I would need to do to eliminate the error?
// *** RepositoryAccess ***
foreach (var volume in Laserfiche.RepositoryAccess.Volume.EnumAll(session))
{
VolumeExportSettings volumeSettings = new VolumeExportSettings();
volumeSettings.Path = Path.Combine(@"C:\lfexport\", volume.Name);
volumeSettings.CopyFiles = true;
volumeSettings.VolumeFormatVersion = VolumeFormatVersion.Version8;
LongOperation longOp = volume.Export(volumeSettings);
int writeCount = 0;
while (longOp.IsCompleted != true)
{
Thread.Sleep(1000);
longOp.Refresh();
}
}
// *** LFSO104Lib ***
ILFCollection AllVols = (ILFCollection)db.Database.GetAllVolumes();
for (int i = 1; i < AllVols.Count; i++)
{
string EXPORT_DIRECTORY = Path.Combine(@"C:\lfexport\", volume.Name);
LFVolume Vol = (LFVolume)AllVols[i];
LFProgress progress;
if (Vol.Name.Contains(exportDate))
{
progress = Vol.Export(EXPORT_DIRECTORY + Vol.Name, true, Export_Version.EXPORT_VERSION_8);
while (!progress.IsComplete)
{
progress.Refresh();
}
}
}