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

Question

Posted to Laserfiche Cloud

Question

What is it wrong with my RepositoryRegistration config in SDK?

asked on September 24, 2024 Show version history

Hello! I am try to use this code to get some details of the file with ID 14496:

            RepositoryRegistration myRepoReg = new RepositoryRegistration("Repository Name", "Repository Name");
            Session mySess = new Session();
            mySess.IsSecure = true;
            mySess.LogIn("Username", "Password", myRepoReg);

            DocumentInfo docInfo = (DocumentInfo)Entry.GetEntryInfo(14496, mySess);

            SetTokenValue("xLocalName", docInfo.GetLocalName().ToString());

But when I ran this code I received this error:

The TLS/SSL host name does not match the host name in the X.509 certificate.

I don't know what I am making wrong, for this line:

RepositoryRegistration myRepoReg = new RepositoryRegistration("Repository Name", "Repository Name");

I am tried to use new RepositoryRegistration("IP Address I get from ipconfig", "Repository Name");

But I have received the same unsuccessfully answer, what Am I making wrong?

Thanks in advanced!

0 0

Replies

replied on September 24, 2024

"Laserfiche Repositories" is just the label for the tree - for the most part, we try not to expose users to unnecessary details like server names.

RepositoryRegistration(string serverName, string name)

 

You need to pass in the name of the server that hosts the repository. ipconfig gives you your own ip address, so it sounds like you want to connect to the local server. The certificate would be issued to a host name, not an ip address, which is what the error "[t]he TLS/SSL host name does not match the host name in the X.509 certificate" is saying. You should pass in the dns name of your machine (not "localhost") as the first argument, including the domain (since the certificate will include the domain). If you continue to get this error, you should inspect the certificate to see what names are included in it.

0 0
replied on September 25, 2024 Show version history

Thank you! you help me a lot.

For future references, If other users are stuck in this process follow this steps:

1- Open Command Prompt (search for cmd in the Start menu).

2- Run 'hostname' (Imagine you received the value 'YourOrgEnv')

3- Run nslookup Your Host name (in the example is 'nslookup YourOrgEnv')

Now you are going to see a section show the name of your host name with the domain (Imagine in this example is YourOrgEnv.YourOrg.COM )

4- Now put this value in this way:

RepositoryRegistration("YourOrgEnv.YourOrg.COM", "The repository name you want to connect")

Thansk for your help Brian!

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

Sign in to reply to this post.