使用ADSI获取IIS应用程序池列表,C#源代码示例
来源:互联网 发布:淘宝优惠卷群怎么赚钱 编辑:程序博客网 时间:2024/05/30 23:00
ApplicationPool[] AppPools = IISHelper.GetApplicationPools();
foreach (ApplicationPool pool in AppPools)
...{
Console.WriteLine(pool.Name);
}
foreach (ApplicationPool pool in AppPools)
...{
Console.WriteLine(pool.Name);
}
/**//// <summary>
/// 获取应用程序池->数组
/// </summary>
/// <returns></returns>
public ApplicationPool[] GetApplicationPools()
...{
if ((SiteInfo.ServerType != WebServerTypes.IIS6) && (SiteInfo.ServerType != WebServerTypes.IIS7)) return null;
DirectoryEntry directoryEntry = GetDirectoryEntry("IIS://LOCALHOST/W3SVC/AppPools");
if (directoryEntry == null) return null;
List<ApplicationPool> list = new List<ApplicationPool>();
foreach (DirectoryEntry entry2 in directoryEntry.Children)
...{
PropertyCollection properties = entry2.Properties;
ApplicationPool pool = new ApplicationPool();
pool.Name = entry2.Name;
list.Add(pool);
}
return list.ToArray();
}
/// 获取应用程序池->数组
/// </summary>
/// <returns></returns>
public ApplicationPool[] GetApplicationPools()
...{
if ((SiteInfo.ServerType != WebServerTypes.IIS6) && (SiteInfo.ServerType != WebServerTypes.IIS7)) return null;
DirectoryEntry directoryEntry = GetDirectoryEntry("IIS://LOCALHOST/W3SVC/AppPools");
if (directoryEntry == null) return null;
List<ApplicationPool> list = new List<ApplicationPool>();
foreach (DirectoryEntry entry2 in directoryEntry.Children)
...{
PropertyCollection properties = entry2.Properties;
ApplicationPool pool = new ApplicationPool();
pool.Name = entry2.Name;
list.Add(pool);
}
return list.ToArray();
}
/**//// <summary>
/// 应用程序池
/// </summary>
public class ApplicationPool
...{
/**//// <summary>
/// 版本
/// </summary>
public string DotNetVersion = "v2.0.50727";
/**//// <summary>
/// 应用程序池名
/// </summary>
public string Name = "";
}
/// 应用程序池
/// </summary>
public class ApplicationPool
...{
/**//// <summary>
/// 版本
/// </summary>
public string DotNetVersion = "v2.0.50727";
/**//// <summary>
/// 应用程序池名
/// </summary>
public string Name = "";
}
- 使用ADSI获取IIS应用程序池列表,C#源代码示例
- 使用ADSI获取IIS应用程序池列表
- 使用ADSI获取IIS版本,C#源代码示例
- 使用ADSI获取IIS版本
- 在一个c++应用程序中使用ADSI配置IIS
- C#示例: 获取应用程序目录
- ADSI接口获取AD域服务器账户列表[VC++]
- 使用ADSI来操作IIS的时的路径
- .Net中需要使用ADSI来操作IIS
- ADSI 接口操作IIS
- 通过ADSI管理 IIS
- 使用GIT工具获取android应用程序源代码
- 如何操纵文件共享使用 ADSI (VB 示例)
- C# IIS应用程序池辅助类
- 使用C#获取服务器IIS版本
- 使用C#获取服务器IIS版本
- 用ADSI+ASP添加IP到IIS禁止访问列表中
- 获取本地机器支持的.NET版本,C#源代码示例
- 使用ADSI获取IIS版本,C#源代码示例
- read by chopinwzc.spaces.live.com
- DataGrid的诸多内容的实现
- 在Struts 2中实现文件上传
- 如何用地道流利的英语写好一份求职信
- 使用ADSI获取IIS应用程序池列表,C#源代码示例
- 热门英语博客
- 自己练习口语的方法
- VB.NET DataGridViewComboBoxColumn控件赋值
- CMM 5级定义
- JAVA中浅复制与深复制
- 判断日文汉字的正则
- Composite模式及其在JSF中的应用
- 巧妙实现CSS圆角效果