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

Question

Question

Connect to NAS with authentification and create folder

asked on January 28, 2023

Hi all,

Using C# or VB.NET (Workflow/SDK), I want to create a folder on a NAS but I need to enter the login details.

This is my actual code

Protected Overrides Sub Execute()
            'Rédigez votre code ici. La propriété BoundEntryInfo accèdera à l'entrée, RASession obtiendra la section de Repository Access
             Dim pathToCreate As String = GetTokenValue("dossier_destination")
            Dim success As Boolean = False
            Try
                System.IO.Directory.CreateDirectory(pathToCreate)
                success = True

                Catch ex As Exception
                Me.WorkflowApi.TrackError(ex.message)
            End Try
            Me.SetTokenValue("Success", success)
        End Sub

The error indicates that the username or password is incorrect.

 

What is the code to indicate the identifiers?

 

Thanks in advance.

Regards

0 0

Replies

replied on January 30, 2023

When a workflow interacts with Windows, it will use the identity that the Workflow service is set to "Log On As"

To connect to network resources, the "Log On As" needs to be a domain user with permissions to the network location.

2 0
replied on January 30, 2023

Hi Bert!

I am happy to read you again ^^

 

You already gave me this solution in a previous post, but I think the situation is slightly different here.

 

The login that will allow me to connect to the NAS is a login created on the NAS itself (domain : BnB)

 

The domain of the Laserfiche server is WORKGROUP and I can't find the NAS users.

0 0
replied on January 31, 2023

It appears that the NAS is not actually part of your domain - though "WORKGROUP" makes it sound like you don't really have a domain in the first place. In that case, there is no account that is runnable on the server that will also be trusted by the NAS.

The problem should still be solvable, but it will probably require more code - your code will need the credentials and will need to more explicitly authenticate. You should contact the SAN vendor about how to save data to it programmatically.

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

Sign in to reply to this post.