【发布时间】:2015-03-16 14:37:39
【问题描述】:
我正在从 MVC 网站执行此代码。如果我从 VS 2012 IIS express 运行此代码,它可以工作,但如果我将网站托管在 IIS 服务器上,它就不起作用。我尝试调试,但出现了一些错误代码。如果我也冒充我的身份并传递我的身份但一切都是徒劳的。
代码:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
Char[] chr = Password.ToCharArray();
System.Security.SecureString pwd = new System.Security.SecureString();
foreach (char c in chr)
{
pwd.AppendChar(c);
}
proc.StartInfo.FileName = path to WZZip.exe
//proc.StartInfo.Arguments = -ys20480 pathtosplit landingZone;
proc.StartInfo.UserName = UserName; //Comes from config file
proc.StartInfo.Password = pwd; //Comes from config file
proc.StartInfo.Domain = Domain; //Comes from config file
proc.StartInfo.RedirectStandardError = true;
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.UseShellExecute = false;
bool result = proc.Start();
【问题讨论】:
-
“出现一些错误代码”。分享您拥有的任何错误信息是一个非常好的主意,这样我们就不必要求它...
-
错误码是-10732860
-
错误信息是只读或只写进程部分完成
-
drax 我已经完成的部分,但同样的错误即将到来
标签: c# asp.net asp.net-mvc iis iis-express