I'm trying to uploading a file and then using server-side processes to convert it.
This is part of a Visual Studio Web ASP.NET web application running on a ASP.NET Development server, localhost:8638
string fn = System.IO.Path.GetFileNameWithoutExtension(File1.PostedFile.FileName);
Process p = new Process();
p.StartInfo.WorkingDirectory = Server.MapPath("/Data");
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.Arguments = "soffice --headless --invisible -convert-to pdf "+fn+".ppt";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardOutput = true;
p.Start();
p.WaitForExit();
I can manually open cmd.exe inside of the Datadirectory, then type this command, substituting the file name, and it'll work. However, running this code does not produce any result
What am I missing, or doing wrong?
cmd.exedoesn't take arguments like that. You should run the process itself.