I am trying to create a LFSO 10.2 program to export to briefcase from 1 repository and import that briefcase into another repository. The program works if both repositories are on-prem systems, but if I try to import the briefcase into a cloud repository, my program throws an error "'System.Runtime.InteropServices.COMException' Unspecified error".
If I manually try to import the briefcase created by my program into a cloud repository using the Web browser, it fails, but if I import the same briefcase into the cloud repository using the Windows client, it imports without problems. If I use the Windows client to create the briefcase, I can import it into the cloud repository without any errors.
Below is the code that I am using to create the briefcase. Is there something that needs to change in my code to correctly export the briefcase?
Private Function ExportEntryToBriefcase(ByVal iDocID As Integer, ByRef sWinPath As String, ByRef DB As LFDatabase) As Boolean Dim bReturn As Boolean = False Try Dim sEntryName As String = Nothing Dim CurrentEntry As ILFEntry = DB.GetEntryByID(iDocID) sEntryName = CurrentEntry.Name sEntryName = sEntryName.Replace("<", "_") sEntryName = sEntryName.Replace(">", "_") sEntryName = sEntryName.Replace(":", "_") sEntryName = sEntryName.Replace("""", "_") sEntryName = sEntryName.Replace("/", "_") sEntryName = sEntryName.Replace("\", "_") sEntryName = sEntryName.Replace("|", "_") sEntryName = sEntryName.Replace("?", "_") sEntryName = sEntryName.Replace("*", "_") Dim exporter As LFBriefcaseExporter = DB.GetBriefcaseExporter() exporter.AddEntry(CurrentEntry) sWinPath = System.IO.Path.Combine(sWinPath, sEntryName & ".lfb") exporter.Export(sWinPath) Dim iProgress As Integer = exporter.GetProgress() Console.WriteLine("Progress: " & iProgress.ToString()) While iProgress <> 100 AndAlso iProgress <> -999 iProgress = exporter.GetProgress() Console.WriteLine("Progress: " & iProgress.ToString()) End While exporter.Close() exporter.Dispose() CurrentEntry.Dispose() bReturn = True Catch ex As Exception Console.WriteLine(ex.Message) MessageBox.Show(ex.Message) bReturn = False End Try Return bReturn End Function