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

Question

Question

Access Denied when Creating New Repository

SDK
asked on October 13, 2022

I have an error when creating a new repository using the SDK 

The error message is: Access Denied

Current code in C#:

try
            {
                RepositoryProperties repository = new RepositoryProperties();
                repository.Name = "Testing_Rep";
                repository.DatabaseServer = "Name of SQL Server";
                repository.DatabaseName = "test_db";
                repository.RepositoryDirectory = @"c:\\Repositories";
                repository.SqlUserId = "sa";
                repository.SqlPassword = "test";
                repository.SearchPort = 5053;
                

                Laserfiche.RepositoryAccess.Admin.ServerManagement serverManager =
                    new Laserfiche.RepositoryAccess.Admin.ServerManagement(serverName);

                serverManager.CreateRepository(repository);
                message= "Repository Created Successfully";
                return true;
            }

            catch (Exception ex)
            {
                message= ex.Message;
                return false;
            }

0 0

Replies

replied on October 13, 2022

Is the currently logged in Windows user when this code is run a local Windows administrator on the Laserfiche Server? (or if this runs as a service, is the service login account a local administrator on the Laserfiche server)

0 0
replied on October 23, 2022

Yes it is run using local windows admin 

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

Sign in to reply to this post.