Hi everyone,
We're trying to set up a script that will export pages from a document in Laserfiche Cloud when certain conditions are met. The script we're using is the following:
public class ExportarPagina { public static Task<IDictionary<string, object>> MyScript(IDictionary<string, object> inputsFromRule) { //Initialize a Dictionary to store your outputs var outputsFromScript = new Dictionary<string, object>(); int EntryID = Int32.Parse(inputsFromRule["EntryID"].ToString()); string Ruta = inputsFromRule["Ruta"].ToString(); //path to save exported pages or doc string numPags = inputsFromRule["NumeroPagina"].ToString(); //values: number between 1 and n; word:Completo try { // Session login CloudTicketRequestSettings cloudTicketSettings = new CloudTicketRequestSettings(); cloudTicketSettings.AccountId = "xxxxxxxxx"; cloudTicketSettings.UserName = "xxxxxxxxxx"; cloudTicketSettings.Password = "xxxxxxxxxx"; cloudTicketSettings.CustomEndpoint = new Uri("https://acs.laserfiche.com/ACS"); string repositoryHost = "r-abcde123.laserfiche.com"; CloudTicket cloudTicket = CloudTicket.GetTicket(cloudTicketSettings); Session cloudSession = Session.Create(repositoryHost, cloudTicket); //Actions here cloudSession.LogOut(); return Task.FromResult<IDictionary<string, object>>(outputsFromScript); } catch (Exception e) { outputsFromScript["Mensaje"] = e.ToString(); return Task.FromResult<IDictionary<string, object>>(outputsFromScript); } } }
The script works as expected in the dev environment with our server. However, once we move it to production, we get the following error:
Laserfiche.HttpClient.HttpException: Error sending HTTP request to server. ---> System.ComponentModel.Win32Exception: Unknown error (0x2efd)
--- Fin del seguimiento de la pila de la excepción interna ---
en Laserfiche.HttpClient.HttpRequest.DoSendRequest()
en Laserfiche.HttpClient.HttpRequest.SendRequestWithCredentials(Boolean useKerberos, Boolean negotiateAuth)
en Laserfiche.HttpClient.HttpRequest.SendRequest()
en Laserfiche.RepositoryAccess.CloudTicket.GetTicket(CloudTicketRequestSettings requestSettings)
en LF_Cloud_ExportarPaginas.ExportarPagina.MyScript(IDictionary`2 inputsFromRule)
Technically, both servers have been set up the same way. There are different AV in both, but rules have been set in place to allow the URLs. If we ping from the prod server to the repository URL and we can get to it without issues. We can also log in to Cloud from that server using the browser. The Remote Agent has been updated to the latest available version in cloud and connection is established with the repository.
Searching on answers and online I find that this issue is most likely related to a network problem, but like I said, technically the connections are enabled. Has anyone else come across this issue with LF Cloud?