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

Question

Question

sdk Server.GetRepositories() over ssl

asked on June 20, 2015

With SDK , I use the following in a ComboBox DropDown event to populate the list with available repositories attached to a server:

        Try
            If String.IsNullOrEmpty(sLFServer) Then
                MessageBox.Show("Please provide a Laserfiche server name or IP.")
            Else
                Using svr As New Server(sLFServer)
                    Dim AllRepositories As RepositoryRegistrationCollection = svr.GetRepositories()
                    For Each Repo As RepositoryRegistration In AllRepositories
                        If Not cmbLFRepository.Items.Contains(Repo.Name) Then
                            cmbLFRepository.Items.Add(Repo.Name)
                        End If
                    Next
                End Using
            End If
        Catch ex As Exception

The problem that I am running into is if the server is set to use SSL and port 80 is not available my code throws error :

Laserfiche.RepositoryAccess.AccessDeniedException = {"The user account name or password is incorrect. [9010]"}

I have only tried with RA9.2 and LFS 9.2.1.

I have also tried to add

svr.IsConnectionSecure = True

before calling the .GetRepositories but that did not help either.  How do I get the available repositories?

0 0

Answer

SELECTED ANSWER
replied on June 22, 2015

Does it work with port 80 unblocked? I can get the repository list over SSL using your code (with IsConnectionSecure=true).  Try enabling logging by calling InitializeMethodTracer: 

MethodTracer.InitializeMethodTracer(@"c:\logs\RA.log");

The log might indicate what is going wrong.

0 0

Replies

replied on July 2, 2015

Sorry about the delay, I was on vacation. It looks like RA can't authenticate your user using domain authentication to get the repository list. I can try connecting to your server myself if you want.

1 0
replied on July 2, 2015

RA should still be able to get the repository list when the server level authentication fails, I think this might be a bug in the SDK.

1 0
replied on June 23, 2015

Robert, thanks for the response.  When I get a chance, I will play with it more and try the tracing you suggested.

0 0
replied on June 25, 2015

Since Robert was able to make it work and his MethodTracer sample is in C#, I figured I would try it in C# to see if it made a difference.  It did not.

Here is a screenshot of my code with the caught error:

Here is the content of the RA.Log:

2015-06-25 Laserfiche.RepositoryAccess (9.2.1.514)
Current Process: C:\Users\Bert\documents\visual studio 2010\Projects\RA_Demo_Login_CSX2010\RA_Demo_Login_CSX2010\bin\Debug\RA_Demo_Login_CSX2010.vshost.exe [PID=7924]
Computer Name: PFT31SALES

08:48:26.229 [008]Form1.cmbRepository_DropDown
08:48:26.233 [008] Server.GetRepositories
08:48:26.235 [008]      ServerSession..cctor
08:48:26.258 [010]TimerQueueTimer.CallCallbackInContext
08:48:26.260 [008]   Server.GetServerSess
08:50:21.702 [012]TimerQueueTimer.CallCallbackInContext
08:50:59.205 [011]TimerQueueTimer.CallCallbackInContext
08:51:36.711 [013]TimerQueueTimer.CallCallbackInContext

From the LF 9.2.1 client on the same PC, I can attach to the server and the repository dropdown of the attach process will fill.  Robert, I can provide you my server name (in email) if you want to test against it.

0 0
replied on July 2, 2015

Since when does a user authenticate to get a repository list?

Email me bwarren@paperfreetech.com and I will provide my server information for you to test against.

0 0
replied on July 3, 2015

Thanks for the help and update.  I will keep an eye open for an updates and/or fixes.

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

Sign in to reply to this post.