0
当我尝试从visualstudio 2012 Webforms应用程序运行PSEXEC时。我得到以下错误: - StandardOut尚未重定向或该过程尚未开始。VisualStudio 2012从web应用程序错误中运行PSEXEC
我有一些非常基本的问题,以了解: -
- 当我运行它运行在本地主机上的web应用:2322/Default.aspx的。那么localhost默认运行在“DefaultAppPool”上吗?
- ApplicationPoolIdentity正在内置帐户“ApplicationPoolIdentity”上运行我试图在IIS 7.5中将其更改为“本地系统”和“网络服务”,但仍然会引发上述错误。
下面是我的代码: -
var startInfo = new ProcessStartInfo
{
CreateNoWindow = true,
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardInput = true,
FileName = @"E:\PSTools\PSExec.exe",
Arguments = @"\\machineA -u domain\username -p passwrd c:\Installer.exe"
};
Process p = Process.Start(startInfo);
string output = p.StandardOutput.ReadToEnd();
string errormessage = p.StandardError.ReadToEnd();
p.WaitForExit();
感谢,
感谢您的答复。那解决了这个错误。但我正在获取远程服务器连接问题。我怎样才能得到用户帐户/凭据在process.start运行在编程方式在C#中? – user117048 2014-09-03 21:35:54