Q
Problem solve Get help with specific problems with your technologies, process and projects.

Command prompt doesn't run on server

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.

This was last published in August 2003

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close