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

Question

Question

lfConnection.Create over SSL/TLS

asked two days ago

Hello,

I am wondering if anyone has experience with connecting to Laserfiche server securely (over TCP 443) using LFConnection.Create() method. We thought that setting the Secure property to True would do the trick, but it didn't. The application reported time-out (at Create) as soon as port 80 was closed on the fw.

public static conn CreateConnectionObject(LFDatabase lfdb)
        {
            LFConnection conn = null;
	    
            conn = new LFConnection();
	    conn.UserName = "LFUser";
            conn.Password = "LFPass";
            conn.Shared = true;
            
            //Enables secure connection
            conn.Secure = true;

            try
            {
                conn.Create(lfdb);
                Console.WriteLine("Created connection to Laserfiche server (GUID={0})", conn.GUID);

            }
            catch (Exception ex)
            {
                Console.WriteLine("Exception calling conn.Create(LFDB) : {0}", ex);
                throw;
            }

            return conn;
        }
 

Rewriting using RepositoryRegistration and Session is a better way. But we want to find out if we can make secured connection with LFConnection or not?

Any suggestion or tip is appreciated. Thank you.

0 0

Replies

replied two days ago

I have not tested the code, but I think your issue may be in how you setup the LFServer object before the login.  I believe that the LFApplication.GetServerByName uses standard port 80 and possibly the LFApplication.GetSSLServerByName uses SSL port.  Worth a try.

                // Creates a new application object.
                LFApplication app = new LFApplication();
                // Finds the appropriate server.
                LFServer serv = null;
                if (bUseSSL)
                {
                    serv = (LFServer)app.GetSSLServerByName(sLFS);
                    serv.ConnectSecurely = bUseSSL;
                    serv.SSLPort = 443;
                } else
                {
                    serv = (LFServer)app.GetServerByName(sLFS);
                }

 

0 0
replied one day ago

Thank you for the suggestion. This looks promising smiley. I will test this out and give an update soon. Have a nice weekend!

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

Sign in to reply to this post.