Restart IIS7 programmatically (C #)

Is it possible to restart IIS7 using C #? If so, how?

+2


source to share


2 answers


System.Diagnostics.Process.Start(@"C:\windows\system32\iisreset.exe");

      

should do the trick :)



Dan

+9


source


Just execute the command line parameter using System.Diagnostics.Process.Start();



+2


source







All Articles