Hi everyone,
I've done a lot of Googling for this problem and found that a lot of people have had this same issue. I need my ASP.NET application to run a batch file on the server.
My situation:
1. If I do not impersonate an account, so that the user who runs the .bat file is 'NETWORK SERVICE', then the bat file runs (but some of the commands in the bat file don't work because they require a specific user to execute them and 'NETWORK SERVICE' will never be able to), so impersonation is necessary.
2. When I impersonate an account, I cannot run batch files. The created process exits immediately, returning a 1. (Note: The .bat file in question has full control from everybody.)
3. I can run the .bat file successfully from command line when actually logged onto the server as the same user that my ASP.NET web app impersonates.
4. Whether or not I am impersonating an acco ...
Go to the complete details ...