0
public static void RestartIIS()
{
string path = Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\iisreset.exe";
System.Diagnostics.ProcessStartInfo info = new System.Diagnostics.ProcessStartInfo(path);
info.UseShellExecute = true;
System.Diagnostics.Process.Start(info);
}
你的问题是什么? – Justin
你是否需要重新启动IIS或只是该网站?做后者的一个肮脏的方法是简单地写一个文件到网站。 –
它不工作..有没有解决方案? – husseinzx