Passing a paramter to a .net task - VisualCron - Forum

Community forum

hansvl
2021-11-01T16:23:31Z
I use VisualCron 9.9.0
I found in the forum the .net code below to get the owner of a file.
But how can I pass a parameter with the file path to this .net task?
The code compiled without errors.
But executing give a lot of errors.

Unhandled execution error: System.Reflection.TargetInvocationExecption: Execption has been thrown by the target of an invocation. --->System.ArgumentExecption: Invalid name.
....



using System;

public class Test
{
public static string GetCreator(string path)
{
return System.IO.File.GetAccessControl(path).GetOwner(typeof(System.Security.Principal.NTAccount)).ToString();
}
}
Scroll to Top