Following is my code and not working on iis. But working on local.
This code is to convert up file to wav file and play after.
It convert and store audio file on local but not on IIS
public void ExecuteCommandSync(object command)
{
try
{
string exepath;
string AppPath = Request.PhysicalApplicationPath.Replace("http:\\", "");
exepath = Server.MapPath("tmp/Up2Wav.exe");
string strCmd = exepath + " " + command;
StreamWriter _testData = new StreamWriter(Server.MapPath("data.txt"), true);
_testData.WriteLine(strCmd);
System.Diagnostics.ProcessStartInfo procStartInfo =
new System.Diagnostics.ProcessStartInfo("cmd", "/c " + strCmd);
procStartInfo.RedirectStandardOutput = true;
procStartInfo.UseShellExecute = false;
procStartInfo.CreateNoWindow = true;
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.StartInfo = procStartInfo;
proc.Start();
string result = proc.StandardOutput.ReadToEnd();
Console.WriteLine(result);
_testData.WriteLine(result);
_testData.Close();
_testData.Dispose();
}
catch (Exception objException)
{
}
}