问题
Is it possible to restart IIS7 using C#? If so, how?
回答1:
System.Diagnostics.Process.Start(@"C:\windows\system32\iisreset.exe");
should do the trick :)
Dan
回答2:
Just execute the command-line option using System.Diagnostics.Process.Start();
来源:https://stackoverflow.com/questions/1315654/programmatically-restart-iis7-c