public static void EseguiOttimizzatore(String path, string filename)
{
Process proc = new Process();
proc.StartInfo.FileName = path + "nst.exe";
proc.StartInfo.WorkingDirectory = path;
proc.StartInfo.Arguments = filename;
proc.StartInfo.UseShellExecute = false;
try
{
proc.Start();
}
catch(FileNotFoundException e)
{
GLogWriter.Write("Eseguibile non trovato, copiare l'eseguibile dalla cartella lib a bin", LogCategories.Business, NstTraceEventType.Critical);
throw e;
}
proc.WaitForExit();
proc.Close();
}
当我在调试模式或我的本地计算机上使用我的应用程序时,它工作正常,但如果我在生产服务器上运行IIS,请找到我的costum路径(变量path
)但我的exe运行在目录C:\Windows\system32\inetsrv\
中忽略我的path
。
我错过了什么吗?