You are viewing limited content. For full access, please sign in.

Question

Question

Operation timed out while trying to connect to laserfiche From C#

SDK
asked on July 21, 2015 Show version history

when we are trying to connect to the Server  to create Folders i the server using laserfiche sdk in C# we are getting operation Timed out error.below is the code we are using the below code


            string serverName = "Servername", repoName = "repomname";
            string username = "username", password = "password";
          
            try
            {
                // log into the repository
                RepositoryRegistration repository = new RepositoryRegistration(serverName, repoName);
                Session session = new Session();
                session.IsSecure = true;              
                Console.WriteLine("i am here");
                session.Connect(repository);
              
                session.LogIn(username, password, repository);
                Console.WriteLine("i am here too");

                String rootFolder = "\\rootfolderpath";
                int intfolder = Folder.CreateRecordSeries(rootFolder, "", "", EntryNameOption.None, session);
                 Console.WriteLine("Success");
          
            }
            catch (Exception ex)
            {

                throw;
            }

 

Operation timed out. is the error we are getting

 

Thanks

0 0

Replies

replied on July 21, 2015

`IsSecure = true` means that you are going to use SSL and connect to port 443 of the Laserfiche server.  Have you configured LFS to allow that?  "Operation timed out" suggests a network connection problem.  Make sure there isn't anything impeding the connection, like a firewall.

2 0
replied on July 22, 2015

Thanks 

But when i have removed the statement `IsSecure = true` i am getting the below error

No response received from the server.

And when we are connecting from the java application we are able to connect to the sever with out any issues

Thanks

 

0 0
replied on July 22, 2015

we are able to connect the Application using SSL port 443.we are getting a new issue 

{"Could not load file or assembly 'Laserfiche.I18n, Version=9.2.0.0, Culture=neutral, PublicKeyToken=3f98b3eaee6c16a6' or one of its dependencies. An attempt was made to load a program with an incorrect format."}

I have added the dll in my reference and even i have tried adding the dlls from GAC but i am getting the above issue do i need to install anything in my system 

My system Configuration:

Windows server 2008R2 /64 bit

 

Thanks

0 0
replied on July 23, 2015

It sounds like you don't have the necessary SDK files installed to run your program.  See this question or the SDK documentation for information about how to install them.

0 0
replied on July 23, 2015

We are Trying to connect to Laser fiche 8.2 repository with dll version 9.2 of laserfiche

 We have added below reference dll of version 9.2
Laserfiche.DocumentServices.dll
Laserfiche.RepositoryAccess.dll
ClientAutomation.dll
Laserfiche.I18n.dll
Laserfiche.HttpClient.dll

When i am trying to connect to the repository we are able to establish the connection with laser fiche server but unable to login into the server we are getting the below issue

Could not load file or assembly 'Laserfiche.I18n.dll' or one of its dependencies. The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. (Exception from HRESULT: 0x800736B1)":"Laserfiche.I18n.dll"}

do i need to add any other references to override this issue or is there any other process to do this below is the code which we are using 

visual studio:2012

framework :4.5

 

using System;
using System.Data;
using System.IO;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Laserfiche.RepositoryAccess;
using Laserfiche.DocumentServices;
using Laserfiche.RepositoryAccess.Records;
using Laserfiche.RepositoryAccess.Linq;

 

namespace MovingFiles
{
    class Program
    {


        static void Main(string[] args)
        {

                        string rtnstring = "";
            string serverName = "Servername", repoName = "reponame";
            string username = "username", password = "password";

 

            try
            {
                // log into the repository
                RepositoryRegistration repository = new RepositoryRegistration(serverName, repoName, 4050, 443);
                Session session = new Session();
                //session.IsSecure = true;              
                Console.WriteLine("i am here");   

                session.Connect(repository);

//we are getting the issue in the below line when we are trying to login into the session

               session.LogIn(username, password, repository);


                Console.WriteLine("i am here too");

                String rootFolder = "\\1.1.1 record series";
                int intfolder = Folder.CreateRecordSeries(rootFolder, "", "", EntryNameOption.None, session);
                Console.WriteLine("Success");


            
            }
            catch (Exception ex)
            {

                throw;
            }

 


        }
    }

  
}

let us know if laserfiche version 9.2 dll will work to connect to the repository 8.2 or do we need to download the 8.2 version dll if so where we can get the above dlls to be downloaded

 

Thanks

 

 

 

 

 

 

0 0
replied on July 23, 2015

we are able to login to repository session successfully.

Now my issue is i am trying to create record series folder under record series folder.when i am trying to create that particular folder i am getting the error as {"Access denied. (9013) "}

An unhandled exception of type 'Laserfiche.RepositoryAccess.AccessDeniedException' occurred in MovingFiles.exe

Below is the Code I have used

 try
            {
                // log into the repository
                RepositoryRegistration repository = new RepositoryRegistration(serverName, repoName, 4050, 443);
                Session session = new Session();
                Console.WriteLine("i am here");

                session.Connect(repository);
                if (session.IsConnected)
                {
                    Console.WriteLine("we are able to connect to the repository");

                }

                session.LogIn(username, password, repository);
                Console.WriteLine("i am here too");

                String rootFolder = "\\1.1.1 CTEP record series";

//when i am trying to create a Folder with the below line i am getting the Issue

                int intfolder = Folder.CreateRecordSeries(rootFolder, "1.1.1", "", EntryNameOption.None, session);

                Console.WriteLine("Success");


                rtnstring = "Success";
            }
            catch (Exception ex)
            {

                throw;
            }

 

Thanks

0 0
replied on July 23, 2015 Show version history

I'm not an expert in using the SDK, but Access Denied implies that the user you have made the connection with does not have rights to create that folder.

If you log in as the same user into the desktop Client, can you perform that same action?

P.S.

If you use the code option:

it makes your posted code much easier to read (like in your first post, where I added the formatting for you). smiley

0 0
replied on July 24, 2015 Show version history

Thanks for the Reply.

yes we are able to perform all the actions. we are using same credentials to login into the desktop client and able to create folders manually and one more thing we are using same credential in java code from where we are able to create folders in the repository through code.

 

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.