search
Homephp教程PHP开发DirectoryEntry configuration IIS7 ADSI Error: unknown error (0x80005000)

1. Error situation

Environment: win7+iis7.0

DirectoryEntry configuration IIS7 has the following error

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

or

The following code runs normally under IIS6.0, but an error occurs when running under IIS7.0:

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

The exception content is as follows:

[System.Runtime.InteropServices.COMException] {"Unknown error (0x80005000)"}
System.Runtime.InteropServices.COMException
Unknown error (0x80005000)
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)

2. Error analysis

This exception code indicates that the ADSI provider of IIS://localhost/W3SVC/1 does not exist or cannot be accessed .

Open IIS Manager and you can see that the server's localhost (default site) exists and is running, and the main site ID is indeed 1. This indicates that the problem is with the ADSI provider at IIS://localhost.

3. Cause of the error

win7 uses iis7, and IIS 7 does not have ADSI provider installed by default.

4. Solution

To solve this problem, you must install "IIS Metabase and IIS 6 Configuration Compatibility".

"Control Panel"->"Programs and Features"->"Turn Windows features on or off" on the left side of the panel->"Internet Information Services"->"Web Management Tools"-> "IIS 6 Management Compatibility" -> "IIS Metabase and IIS 6 Configuration Compatibility".

As shown below:

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

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

## 5. What should I do if this error occurs in Windows Server 2008?

Under Windows Server 2008, after using the role service to install "IIS Metabase and IIS 6 Configuration Compatibility", the following error may occur:

[System.Runtime.InteropServices.COMException ] {"Access is denied.\r\n"} System.Runtime.InteropServices.COMException

ErrorCode 0x80070005
Access is denied.

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)

This is because Windows Server 2008 is locked by UAC (User Account Control, User Account Control). You need to use the administrator (Administrator) account to execute this program. Another way It is to set the account running this program to have the following permissions: Logon as a Service"/ "Logon as a Batch Job"

The above is the method to solve the ADSI Error error in DirectoryEntry configuration IIS7, as well as the derived Windows Server The solution to this error occurred in 2008. I hope it will be helpful to everyone in solving this kind of problem.

For more related articles about ADSI Error in DirectoryEntry configuration IIS7 (0x80005000), please pay attention to the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)