/// <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