資源簡介
這個類是靜態(tài)類。用來實現(xiàn)管理IIS的基本操作。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.DirectoryServices;
using?System.Text.Regularexpressions;
using?System.Collections;
namespace?BullSofts.Core.Common
{
???///?
????///?這個類是靜態(tài)類。用來實現(xiàn)管理IIS的基本操作。
????///?
????public?class?IISManager
????{
????????public?static?DirectoryEntry?GetDirectoryEntry(string?path)?
????????{
????????????DirectoryEntry?d?=?new?DirectoryEntry(path);
????????????return?d;
????????????DirectorySearcher?s?=?new?DirectorySearcher(path);
????????????s.Filter?=?path;
????????????return?s.FindOne().GetDirectoryEntry();
????????}
????????#region?UserNamePasswordHostName的定義
????????public?static?string?HostName
????????{
????????????get
????????????{
????????????????return?hostName;
???
- 上一篇:winform 文件導出類源碼 Export
- 下一篇:C#中使用開放平臺的流程
評論
共有 條評論