Proc.Start()忽略IIS上的WorkingDirectory

时间:2014-05-07 08:38:37

标签: c# iis process path

        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

我错过了什么吗?

0 个答案:

没有答案