Due to my problem that I am unable to run dos command via my web service.
C# web service running batch file or dos command?
Since I cannot make my web service run dos command directly, I am now thinking about creating C# console app that will run my dos command, then the console app will be invoked by web service.
Is it possible to do so?
The easiest method to call a .Net console application from another .Net application is to link in the assembly, and invoke the static
Mainmethod directly. But if there is any reason you can’t execute commands (permissions), then you’ll have the same problems with this method.If permissions are the problem, then you could:
Also, as John Kalberer mentioned, it could be related to the inability of these services to interact with the desktop. If this is the problem, then see this question.