Author: FrankWoodall | Posted on: 7/9/2010 4:00:10 PM | Views : 450

I wasn't sure where to put this, security seemed the most applicable section.


I'm attempting to create and then execute a batch file on a remote computer on a domain that I am not a member of using WMI. I have code that works perfectly from a console app or a debugging web app, but it does NOT work when I put it into a web app on IIS. I'm a little confused as to why I'm getting a problem. The specific error I get is access to path [path to batch file] is denied.


Here is the code that works perfectly in a console app.



public static void createFTPDir(String user) { String remoteMachine = "fileserver1"; String sBatFile = String.Empty; if (remoteMachine != string.Empty) sBatFile = @"\\" + remoteMachine + "\\d$\\studentaccess\\process.bat"; else ...

Go to the complete details ...