security - Running a windows command in a wcf rest service -


i have wcf rest service running code below:

             string command = @"c:\test.exe";               system.diagnostics.processstartinfo procstartinfo =                  new system.diagnostics.processstartinfo("cmd", "/c " + command);              logger.write(string.format("1"), logtype.error);               procstartinfo.redirectstandardoutput = true;              procstartinfo.useshellexecute = false;               procstartinfo.createnowindow = true;              logger.write(string.format("2"), logtype.error);               system.diagnostics.process proc = new system.diagnostics.process();              proc.startinfo = procstartinfo;              logger.write(string.format("3"), logtype.error);              proc.start();              logger.write(string.format("4"), logtype.error);               string result = proc.standardoutput.readtoend();              logger.write(string.format("5"), logtype.error);              // display command output.              logger.write(string.format("plugin : {0} has started", result), logtype.error); 

it works fine in development machine. when publish service server, problem occurs. latest log in log file written by:

logger.write(string.format("4"), logtype.error); 

i think it's security / permission issue. can run code without problem in server too.

thanks in advance,


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -