/// <summary>
/// 获取当前IIS站点列表
/// </summary>
/// <returns></returns>
public static List<IISStationInfo> GetLocalIISStations()
{
List<IISStationInfo> re = new List<IISStationInfo>();
string entPath = "IIS://localhost/w3svc";
DirectoryEntry ent = new DirectoryEntry(entPath);
foreach (DirectoryEntry child in ent.Children)
{
if (child.SchemaClassName == "IIsWebServer")
{
&n
/// 获取当前IIS站点列表
/// </summary>
/// <returns></returns>
public static List<IISStationInfo> GetLocalIISStations()
{
List<IISStationInfo> re = new List<IISStationInfo>();
string entPath = "IIS://localhost/w3svc";
DirectoryEntry ent = new DirectoryEntry(entPath);
foreach (DirectoryEntry child in ent.Children)
{
if (child.SchemaClassName == "IIsWebServer")
{
&n

这是一个关于如何使用C#获取IIS(Internet Information Services)站点及其子站点和应用程序池信息的博客。博客内容展示了两个类`IISStationInfo`和`IISAppInfo`,用于封装站点的名称、路径、ID以及应用程序的相关数据。
最低0.47元/天 解锁文章
1381

被折叠的 条评论
为什么被折叠?



