i have .bat file in the path C:\inetpub\wwwroot\test.bat
i write code on 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);
}
}
my code work on local machine VS 2015 but when i publish code to IIS not work,
how to fix it on IIS 8?