Want to execute a exe within Application directory, in Dev system it works fine. In IIS, it is not executed, I have tried below points:
- set default application pool to local system
- set defualtpool, NETWORK_SERVICE, Everyone access to exe
- Enabled 32 bit application to application pool
Server Version : Windows Server 2012
IIS Version: IIS 8.0
p.StartInfo = new ProcessStartInfo(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = System.AppDomain.CurrentDomain.BaseDirectory.ToString() + "wkhtmltopdf\\wkhtmltopdf.exe"; string arg1 = ""; arg1 = "www.google.com" + " test.pdf"; p.StartInfo.Arguments = arg1; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.StartInfo.CreateNoWindow = true; p.Start(); p.WaitForExit(60000); p.Close(); p.Dispose();
Bala