Hi all,
I've tried to open a support case but they don't look at SDK exceptions unfortunately...
I'm having a bit of trouble opening an electronic document (.docx in this case) using the SDK. I'm using the below C# code to open the document.
private void displayDocument(int id)
{
OpenOptions oOptions = new OpenOptions();
oOptions.MetadataVisibleTabs = MetadataTab.Fields;
ClientManager lfclient = new ClientManager();
using (lfclient)
{
MainWindow client;
LaunchOptions options = new LaunchOptions();
options.ServerName = "myServerName";
options.RepositoryName = "myRepositoryName";
options.UserName = "myUsername";
options.Password = "myPassword";
options.HiddenWindow = true;
ClientInstance singleLFexe = lfclient.LaunchClient(options);
IList<ClientWindow> OpenFolderBrowsers = lfclient.LaunchClient(options).GetAllClientWindows().ToList();
EntryInfo ei = Entry.GetEntryInfo(id, mySess);
if(ei.EntryType == EntryType.Shortcut)
{
ei = Entry.GetShortcutTarget(ei.Id, mySess);
id = ei.Id;
}
client = OpenFolderBrowsers[0] as MainWindow;
client.OpenDocumentById(id, oOptions);
}
}
The word document opens, however I'm presented with an 'Unknown Error' exception with the below details.
at LFSO100Lib.ILFServer.get_Version()
at Laserfiche.OfficePlugin.Connector.App.CheckServerVersion(LFServer lfServer)
at Laserfiche.OfficePlugin.Connector.App.CheckServerVersion(String server, Int32 port, Boolean ssl)
at Laserfiche.OfficePlugin.Connector.App.CheckServerVersion(RepositoryAdapter connector)
at Laserfiche.OfficePlugin.UI.LogInDialog.BeforeLogin()
at Laserfiche.OfficePlugin.UI.ConnectorProxy.LogInDelegate(IOPConnector connector)
at Laserfiche.OfficePlugin.UI.ConnectorProxy.ExecuteOperation(String rawMethod, Object[] args, Boolean& autoReconnect, Boolean logArgs)
at Laserfiche.OfficePlugin.UI.ConnectorProxy.GetEntry(String path)
at Laserfiche.OfficePlugin.Common.DocModel.OPArtifact.Create(SharingInformation sharingInfo)
at Laserfiche.OfficePlugin.Common.DocModel.OPArtifactFactory.FromLocalDoc(String path, Boolean readOnly)
Any help would be much appreciated! Also for info, I'm using the latest version of Laserfiche Server, Client and SDK.