Some examples of scripting of IIS using ADSI, WMI from VB and C# including the new Microsoft.Web.Administration namespace
;
http://blog.crowe.co.nz/archive/2006/07/04/663.aspx
지난 기사에서도 한번 소개해 드렸었죠.
IIS 7.0 에서 소개되는 새로운 기능들
;
https://www.sysnet.pe.kr/Default.aspx?mode=2&sub=1&pageno=0&detail=1&wid=251&wtype=12
이젠 IIS ADSI Provider / IIS WMI Provider 를 만질 일이 많이 줄어들지도 모르겠습니다. ^^
코드 예제가 같이 나와 있으니, 한번 보십시오.
상당히 직관적인 프로그래밍 인터페이스가 가능해졌습니다.
[내용 인용]
C# -Using Microsoft.Web.Administration ( II7 Only )
using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Web.Administration;
namespace Console_EnumSites
{
class Program
{
static void Main(string[] args)
{
ServerManager iisManager = new ServerManager();
Console.WriteLine("Display IIS Sites in IIS 7");
Console.WriteLine("".PadLeft(40,'-'));
foreach(Site site in iisManager.Sites)
{
Console.WriteLine("{0} {1}", site.Id.ToString().PadRight(12), site.Name);
}
Console.Read();
}
}
}
첨부한 파일은 해당 토픽을 MHTML 파일로 다운로드 받은 것입니다.
[최초 등록일: ]
[최종 수정일: 7/3/2006]