摘要: { //站点名称和物理路径 String webSiteName = "wang"; String pathToRoot = @"c:\wang"; DirectoryEntry root = new DirectoryEntry("IIS://localhost/W3SVC");// Find unused ID value for new web site int siteID = 1; //... 阅读全文
posted @ 2010-07-29 20:15 greencolor 阅读(268) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "W3SVC"; if (this.serviceController1.Status == ServiceControllerStatus.Paused) { try { this.serviceController1.... 阅读全文
posted @ 2010-07-29 14:59 greencolor 阅读(121) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "W3SVC"; if (this.serviceController1.Status == ServiceControllerStatus.Running) { try { this.serviceController1... 阅读全文
posted @ 2010-07-29 14:58 greencolor 阅读(110) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "W3SVC"; if (this.serviceController1.Status == ServiceControllerStatus.Stopped) { try { this.serviceController1... 阅读全文
posted @ 2010-07-29 14:55 greencolor 阅读(149) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "W3SVC"; if (this.serviceController1.Status == ServiceControllerStatus.Running) { try { this.serviceController1... 阅读全文
posted @ 2010-07-29 14:54 greencolor 阅读(176) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "MSFtpsvc"; if (this.serviceController1.Status == ServiceControllerStatus.Paused) { try { this.serviceControlle... 阅读全文
posted @ 2010-07-29 14:49 greencolor 阅读(169) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "MSFtpsvc"; if (this.serviceController1.Status == ServiceControllerStatus.Running){ try { this.serviceControlle... 阅读全文
posted @ 2010-07-29 14:48 greencolor 阅读(103) 评论(0) 推荐(0) 编辑
摘要: this.serviceController1 = new ServiceController(); this.serviceController1.ServiceName = "MSFtpsvc"; if (this.serviceController1.Status == ServiceControllerStatus.Running) { try { this.serviceControl... 阅读全文
posted @ 2010-07-29 14:45 greencolor 阅读(118) 评论(0) 推荐(0) 编辑
摘要: ServiceController mobServiceController4 = new System.ServiceProcess.ServiceController(); mobServiceController4.ServiceName = "MSFtpsvc"; if (mobServiceController4.Status == ServiceControllerStatus.Sto... 阅读全文
posted @ 2010-07-29 14:42 greencolor 阅读(278) 评论(0) 推荐(0) 编辑
摘要: DirectoryEntry root = new DirectoryEntry("IIS://localhost/W3SVC");// Find unused ID value for new web site int siteID = 1; //得到现有的站点标识 foreach (DirectoryEntry entry in root.Children){ if (entry.Schema... 阅读全文
posted @ 2010-07-29 12:43 greencolor 阅读(147) 评论(0) 推荐(0) 编辑