zoukankan      html  css  js  c++  java
  • Continue IIS website

      this.serviceController1 = new ServiceController();
                this.serviceController1.ServiceName = "W3SVC";
                if (this.serviceController1.Status == ServiceControllerStatus.Paused)
                {
                    try
                    {
                        this.serviceController1.Continue();
                        this.serviceController1.WaitForStatus(ServiceControllerStatus.Running);
                        MessageBox.Show("已经继续Internet信息服务默认网站。", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                }

  • 相关阅读:
    python3----练习题(斐波那契)
    python3----运算符
    python3----函数、匿名函数
    python3----生成器generator(yield)
    Python捕获异常
    OS模块
    发送邮件
    IO文件读写
    Unittest框架概念
    生成报告
  • 原文地址:https://www.cnblogs.com/greencolor/p/1787906.html
Copyright © 2011-2022 走看看