I created a wcf service and host in IIS. Inside it has a method to execute program on the server-side by invoking from the client. It doesn't seem to work. Nothing happens when the method is called.
System.Diagnostics.Process.Start(@"C:\MtbKill.bat");
Above is the code that doesn't work. I also tried to some process.
Process[] process = Process.GetProcessesByName("Mtb");
foreach (var item in process)
{
try
{
item.Kill();
}
catch
{
}
}
It is not working too. I'm very confused that is it concerned with authorization? Because I have tried such to create folder, it doesn't have any problem.
Solution
I have searched many sources of related problems. Here is what I found Access is denied at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)