>  기사  >  php教程  >  DirectoryEntry 구성 IIS7에서 ADSI 오류 발생: 알 수 없는 오류(0x80005000)

DirectoryEntry 구성 IIS7에서 ADSI 오류 발생: 알 수 없는 오류(0x80005000)

高洛峰
高洛峰원래의
2017-01-06 16:17:111595검색

1. 오류 상황

환경: win7+iis7.0

DirectoryEntry 구성 IIS7에 다음 오류가 있습니다

DirectoryEntry配置IIS7出现ADSI Error:未知错误(0x80005000)

또는

다음 코드는 IIS6.0에서는 정상적으로 실행되지만 IIS7.0에서는 오류가 발생합니다.

System.DirectoryServices.DirectoryEntry iisServer;
iisServer = new System.DirectoryServices.DirectoryEntry("IIS://localhost/W3SVC/1");
System.DirectoryServices.DirectoryEntry rootFolder = iisServer.Children.Find("Root","IIsWebVirtualDir");//此处抛出异常

예외 내용

[System.Runtime.InteropServices.COMException] {"알 수 없는 오류(0x80005000)"}
System.Runtime.InteropServices.COMException
알 수 없는 오류(0x80005000)
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_IsContainer()
at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
System.DirectoryServices.DirectoryEntries.Find(문자열 이름, 문자열 스키마ClassName)

2. 오류 분석

이 예외 코드는 IIS://localhost/W3SVC의 ADSI 공급자를 나타냅니다. /1이 존재하지 않거나 액세스할 수 없습니다.

IIS 관리자를 열면 서버의 로컬 호스트(즉, 기본 사이트)가 존재하여 실행되고 있는 것을 확인할 수 있으며 기본 사이트 ID는 실제로 1입니다. 이는 IIS://localhost의 ADSI 공급자에 문제가 있음을 나타냅니다.

3. 오류 원인

win7은 iis7을 사용하며 IIS 7에는 기본적으로 ADSI 공급자가 설치되어 있지 않습니다.

4. 솔루션

이 문제를 해결하려면 "IIS 메타베이스 및 IIS 6 구성 호환성"을 설치해야 합니다.

"제어판"->"프로그램 및 기능"->패널 왼쪽의 "Windows 기능 켜기/끄기"->"인터넷 정보 서비스"->"웹 관리 도구"-> "IIS 6 관리 호환성" -> "IIS 메타베이스 및 IIS 6 구성 호환성".

아래와 같습니다.

DirectoryEntry配置IIS7出现ADSI Error:未知错误(0x80005000)

DirectoryEntry配置IIS7出现ADSI Error:未知错误(0x80005000)

5. Windows Server 2008에서 이 오류가 발생하면 어떻게 해야 하나요?

Windows Server 2008에서 역할 서비스를 사용하여 "IIS 메타베이스 및 IIS 6 구성 호환성"을 설치한 후 다음 오류가 발생할 수 있습니다.

[System.Runtime.InteropServices.COMException ] { "액세스가 거부되었습니다.rn"} System.Runtime.InteropServices.COMException
ErrorCode 0x80070005
액세스가 거부되었습니다.

at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System .DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_IsContainer()
at System.DirectoryServices.DirectoryEntries.CheckIsContainer()
at System.DirectoryServices.DirectoryEntries.Find(String name , String SchemaClassName)

Windows Server 2008이 UAC(사용자 계정 제어)에 의해 잠겨 있기 때문입니다. 관리자(Administrator) 계정으로 이 프로그램을 실행해야 합니다. 프로그램에는 다음과 같은 권한이 있습니다: 서비스로 로그온"/ "일괄 작업으로 로그온"

위는 DirectoryEntry 구성 IIS7에서 ADSI 오류 오류를 해결하는 방법이며, 더 나아가 이 문제는 Windows에서 발생합니다. Server 2008 이 오류에 대한 솔루션이 이러한 종류의 문제를 해결하는 데 모든 사람에게 도움이 되기를 바랍니다.

DirectoryEntry 구성의 ADSI 오류: 알 수 없는 오류(0x80005000)에 대한 자세한 내용은 다음을 참조하세요. PHP 중국어 웹사이트!

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.