I have a WCF service that runs a .bat
file. It works on my local system, but I have a problem with running it on the server (Windows server 2012 r2).
I've defined the ANT_HOME
variable to server's environment variables and I've added %ANT_HOME%\bin
to Path
variable.
When I write "ant
" to CMD on the server it works! But when I call the wcf
service from somewhere, it doesn't work.
I found the following error in the log files:
'ant' is not recognized as an internal or external command,
operable program or batch file.
According to this log, I understand that IIS user cannot use the ANT_HOME
variable which is already defined.
What I have tried so far:
- identity impersonate
- giving full permission to IIS user