We are migrating the server from Windows Server 2008 R2 to Windows Server 2012 R2. We have configured the application in IIS 8.5 and provided required permissions. But the batch files (.bat) are not running in the application. We able to run the batch file manually from command prompt and it is executed.
We configured the application in Network Service identity and given permissions for the application.
We use the below Code for running the batch file.
Dim targetDir = "C:\inetpub\wwwroot\TestApp\Batch Files"
p = New Process()
p.StartInfo.WorkingDirectory = targetDir
p.StartInfo.FileName = "runme.bat"`enter code here`
p.StartInfo.Arguments = String.Format("AAC-Sharp Console application")
p.StartInfo.CreateNoWindow = False
p.Start()
p.WaitForExit()
It is working fine in Windows Server 2008 R2. But not in Windows Server 2012 R2.
Could anybody suggest what needs to be done if any specific. We need to complete this as soon as possible. Waiting for response. Thanks again.
Comments
Post a Comment