G
Guest
I need to be able to execute a .bat file from a C# web application
I have the following code that compliles and seems to run fine, but the bat file never does it's work
===================================
System.Diagnostics.Process p = new Process()
p.StartInfo.RedirectStandardOutput=false
p.StartInfo.FileName = "C:\\ftp_scripts\\script.bat"
p.StartInfo.UseShellExecute=true
p.Start()
p.WaitForExit()
p.Dispose();
====================================
The bat file works fine when i don't call it from the web app
What could be wrong?
Is it a permissions thing?
Why am I not getting any errors?
How do I get errors back to my calling code
Any help would be greatly appreciated
-Dan
I have the following code that compliles and seems to run fine, but the bat file never does it's work
===================================
System.Diagnostics.Process p = new Process()
p.StartInfo.RedirectStandardOutput=false
p.StartInfo.FileName = "C:\\ftp_scripts\\script.bat"
p.StartInfo.UseShellExecute=true
p.Start()
p.WaitForExit()
p.Dispose();
====================================
The bat file works fine when i don't call it from the web app
What could be wrong?
Is it a permissions thing?
Why am I not getting any errors?
How do I get errors back to my calling code
Any help would be greatly appreciated
-Dan