I am trying running batch to get files from a folder in another server, and get the error "unknown user name or bad password".
The file server does not belong to any domain, and I share the folder to anyone with full control. When the batch class runs from client, it does work. However, it fails when running as batch.
Does anyone give me some advice?
The codes are as below:
permission = new InteropPermission(InteropKind::ClrInterop);
permission.assert();
directory = new System.IO.DirectoryInfo(_path); // Error occurs here.
files = directory.GetFiles(#AllFilesName + #txt);
counter = files.get_Length();
for (idx = 0; idx < counter; idx++)
{
......
}
CodeAccessPermission::revertAssert();
*This post is locked for comments
I have the same question (0)