4

How do i run a shell command in asp.net ?

I basically want something like system("netstat -an");

I don't want the output to be displayed to the user. Just want to run some maintenance commands.

0

2 Answers 2

7

call System.Diagnostics.Process.Start("netstat", "-an"); as usually

Sign up to request clarification or add additional context in comments.

Comments

3

Use Process.Start:

Process.Start("netstat", "-an");

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.