Is it possible to restart IIS7 using C#? If so, how?
Asked
Active
Viewed 3,485 times
2 Answers
9
System.Diagnostics.Process.Start(@"C:\windows\system32\iisreset.exe");
should do the trick :)
Dan

Daniel Elliott
- 22,647
- 10
- 64
- 82
-
6Probably should use environment variable for windows path though :) – Daniel Elliott Aug 22 '09 at 10:02
-
2
Just execute the command-line option using System.Diagnostics.Process.Start();

Rick Hoving
- 3,585
- 3
- 29
- 49

Henri
- 5,065
- 23
- 24