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

Question

Question

Are there any known issues with using sdk 9.2 and connecting to a 9.1 server?

asked on December 12, 2014

I'm having a heck of a time trying to figure out why I can not authenticate Windows Users with my code when I am able to login with the 9.1 Client just fine. I am using the RA library.

0 0

Answer

SELECTED ANSWER
replied on December 15, 2014

LocalSystem does not actually mean the currently logged in user. It's a special system account that really is only local to that specific machine. If you were trying to do anything that involved authenticating to a remote machine, local system will never be granted access, since the remote machine will have no knowledge of it. 

0 0

Replies

replied on December 15, 2014

Instead of loging into the repository, you should get the session from the Workflow.

See How to get current session from a SDK Script in Workflow

1 0
replied on December 15, 2014

Would you mind pointing me towards Workflow documentation? Is Workflow a separate product?

0 0
replied on December 15, 2014

Sorry, I quickly looked at your code block and saw the class was LFWorkFlow and jumped to the conclusion that you were working on an actual WorkFlow script.

0 0
replied on December 12, 2014 Show version history

There shouldn't be issues, but does it matter if you try using RA 9.1 instead of RA 9.2? Both are present in the SDK 9.2 package. 

0 0
replied on December 12, 2014

I'm using RA 9.2. I tried to go back to 9.1 and got the same error.

0 0
replied on December 12, 2014

We'd probably need a code snippet then to see what's going on. I assume this is from the same machine where the Client is working? 

0 0
replied on December 12, 2014 Show version history

Yes. Two vm's. One client and one server. I'm not sure what code would be of use to you.

LFSession.LogIn(username, password, LFRepository); // works with LF admin account
LFSession.LogIn(LFRepository); // does not work

Error I receive: Access denied. [9013]Laserfiche login failed.

EDIT: I have tried using my account as a fully named user and without be a named user. I've tried logging in with someone else's account and received the same error. I've tried using the server name and the server ip with no luck.

EDIT: more code:

public Session LFSession = new Session();
public RepositoryRegistration LFRepository = new RepositoryRegistration(serverName, repoName);

 

0 0
replied on December 12, 2014

Is this a Win Forms app, or something else?  Can you post enough code or give enough context that it's possible for someone else to reproduce this problem?

0 0
replied on December 12, 2014

It's a service.

public class LFWorkflow
    {
        public static string serverName = "sName", repoName = "rName";
        private static string username = "admin", password = "********";

        public Session LFSession = new Session();
        public RepositoryRegistration LFRepository = new RepositoryRegistration(serverName, repoName);

        private bool LoggedIn = false;
        public string WFStatus;

        //Primary execution for the LFWorkflow class.
        public void Start()
        {
            try
            {
                WFStatus = DateTime.Now.ToString() + ": New LFWorkflow class started." + Environment.NewLine;

                try
                {
                    //LFSession.LogIn(username, password, LFRepository);
                    LFSession.LogIn(LFRepository); // no access with win credentials
                    LoggedIn = true;
                }
                catch (LaserficheRepositoryException ex)
                {
                    WFStatus += "Login failure (RA):" + ex.Message;
                }
                catch (Exception ex)
                {
                    WFStatus += "Login failure:" + ex.Message;
                }

                if (LoggedIn)
                {
                    WFStatus += "Successfully logged in to Laserfiche repository: " + LFSession.Repository.Name + " on server: " + LFSession.Repository.ServerName + Environment.NewLine;
                    WFStatus += "Port: " + LFSession.Repository.Port + ". Secure Port: " + LFSession.Repository.SecurePort + Environment.NewLine;
                }
                else
                { WFStatus += "Laserfiche login failed." + Environment.NewLine; }
            }
            catch (LaserficheRepositoryException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                try
                {
                    LFSession.Close();
                    WFStatus += "Laserfiche connection terminated." + Environment.NewLine;
                }
                catch (Exception) { }
            }
        }

 

0 0
replied on December 12, 2014

And you've configured the service to run as an account that has permission to log in to your Laserfiche repository?

1 0
replied on December 15, 2014

I believe this is the problem. I was able to login with my Win credentials using a WinApp. Any info on configuring the service to run as the right account?

0 0
replied on December 15, 2014

I was able to get it working by changing the log on option accessed in my service's properties. Although I'm not sure if this will help me in the long run. I unchecked Local System account and browsed for my account, but those should be the same accounts.

Capture2.PNG
Capture2.PNG (37.71 KB)
0 0
SELECTED ANSWER
replied on December 15, 2014

LocalSystem does not actually mean the currently logged in user. It's a special system account that really is only local to that specific machine. If you were trying to do anything that involved authenticating to a remote machine, local system will never be granted access, since the remote machine will have no knowledge of it. 

0 0
replied on December 15, 2014

Thanks!

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

Sign in to reply to this post.