I have tried to run the command prompt on a server using System.Diagnostics.Process.Start ("cmd"), but the command prompt doesn't show. Do I have to give any extra rights to the Web application in IIS?
Why would you want to show a UI window on a server? Most probably, nobody will be there to enter a key press! Since ASP.NET is a service account (and process) it can't start UI windows, even if you put the account in the Administrators group or even change the processModel section in machine.config to force it to use a more privileged account. So, as far as I know, there's no way to do that. But again, you should study if such a feature is required for your application.
Starting processes is more of a way to let an independent procedure (maybe a legacy application) to do some work on our behalf and leave the results somewhere (a file, for example), so we can pick it later. Another usage is to perform some sort of "screen scrapping" by using the Process.StartInfo.RedirectStandardOutput and RedirectStandardInput and then reading/writing through the process' StandardOutput/StandardInput streams.
Dig Deeper on Win Development Resources
Related Q&A from Daniel Cazzulino
Here Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.