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

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

  • 相关阅读:
    单选多选样式写法
    深拷贝方法
    防抖和节流的实现
    yarn 常用指令
    前端性能监控
    全表 or 索引
    Order by
    DINSTINCT
    智力题
    概率问题
  • 原文地址:https://www.cnblogs.com/greencolor/p/1787895.html
Copyright © 2011-2022 走看看