C1Preview.2_2.0.20073.42111
Our application exports a series of rtf and pdf versions of each document to a central network drive. This can number up to 100. I use the following code:
Dim lexpFileExportRTF As New C1.C1Preview.Export.RtfExporter
lexpFileExportRTF.Paginated = True
lexpFileExportRTF.Preview = False
lexpFileExportRTF.ShowOptions = False
lexpFileExportRTF.Document = C1PrintDocument1
lexpFileExportRTF.Export(lstrFileName)
All works very well, but periodically will return an error:
Error Description: The specified network name is no longer available.
Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.WriteCore(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.FileStream.FlushWrite(Boolean calledFromFinalizer)
at System.IO.FileStream.Flush()
at System.IO.BinaryWriter.Flush()
at System.IO.BinaryWriter.get_BaseStream()
at hb.f()
at ff.a(hb A_0)
at th.a(hb A_0)
at nu.a(Stream A_0, Boolean A_1)
at nu.l(String A_0)
at C1.C1Preview.Export.RtfExporter.InternalExport()
at C1.C1Preview.Export.Exporter.Export(String fileName)
at ShedBuilder.frmPrintOptionsC1.MakeDocumentExport(C1PrintDocument C1PrintDocument1, String pstrFileName, String pstrFileExtension) in C:\GarageWorldDotNet\ShedBuilder.NET\frmPrintOptionsC1.vb:line 819
at this stage lstrFileName maybe "H:\ShedDataMasterDotNet\ShedOrders\1788-2341-1-Anderson_Bracketry.rtf"
It only happens to rtf, not the same file each time. I am wondering if it could be a timing issue with the server access? The file is actually created when this error occurs, but the file is empty/corrupt.
Any ideas?
Regards, Dale