Is it possible to restart IIS7 using C#? If so, how?
Asked
Active
Viewed 3,452 times
2 Answers
9
System.Diagnostics.Process.Start(@"C:\windows\system32\iisreset.exe");
should do the trick :)
Dan
Daniel Elliott
- 22,229
- 10
- 62
- 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,527
- 3
- 28
- 48
Henri
- 5,045
- 19
- 24