Cannot send this string using runcommand() with c#

Feb 7, 2014 at 12:34 PM
Im quite confused and basically out of ideas...Below is the simple code i've written to try it out
it will connect but will not execute the command..
            using (var client = new SshClient("10.182.65.253", "xnat", "xnat160"))
            {

                client.Connect();
                string xnatCli = @"XNATRestClient -host http://localhost:8080/xnat/ -u admin -p administrator -m PUT -remote ""/data/archive/projects/prj005/subjects/test12/experiments/visit12?xnat:petSessionData/date=12/12/12""";
               
                var cmd = client.RunCommand(xnatCli);
                cmd.Execute();
                var outputQuery = cmd.Result;
                Console.Write(outputQuery);
                Console.Read();

            }
Is there a string limitation on ssh.net runcommand method?..I'm sorry if i'm doing something silly..Thank you so much for your help..Cheers..
Feb 7, 2014 at 3:05 PM
Check the exit code of your command and ensure XNATRestClient is in your $PATH.
Feb 7, 2014 at 3:22 PM
Edited Feb 7, 2014 at 3:39 PM
Will try it cheers...Thanks for the tip..