다음 코드 조각으로 IIS 서버에서 호스팅 된 웹 사이트를 가져 오는 방법을 만들었습니다. 내가 서버 시스템 (Windows server 2003 R2 with IIS 6)
에서 실행할 때 내가 그것을 working.It이 어떤 도움이 가득 좋을 것IIS에서 호스트 된 웹 사이트 이름을 얻으려면
Retrieving the COM class factory for component with CLSID {2B> 52-803546CE3344} failed due to the following error: 80040154> d (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
오류 다음 준다의 IT 완벽 (Windows 7 /IIS 7 with 32bits)
나누었다을 일하고 내 로컬 컴퓨터에서 실행
ServerManager serverManager = new ServerManager();
try
{
foreach (Site site in serverManager.Sites)
{
Console.WriteLine(site);
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.ReadLine();
}
?