我在路径C:\inetpub\wwwroot\test.bat
中有.bat文件我在MVC .net上编写代码,
public static void run_cmd(string batchscript,string args,string userid)
{
try
{
Process proc = null;
proc = new Process();
proc.StartInfo.FileName = batchscript;
proc.StartInfo.Arguments = args + " " + userid;
proc.StartInfo.CreateNoWindow = false;
proc.Start();
proc.WaitForExit();
}
catch (Exception ex)
{
System.Diagnostics.EventLog.WriteEntry("run cmd", ex.ToString(), System.Diagnostics.EventLogEntryType.Error);
}
}
我的代码在本地计算机VS 2015上工作,但是当我向IIS发布代码不起作用时,
如何在IIS 8上修复它?