亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

DirectoryEntry配置IIS7出現(xiàn)ADSI Error:未知錯(cuò)誤(0x80005000)

 更新時(shí)間:2015年09月28日 11:57:55   投稿:lijiao  
這篇文章主要介紹了DirectoryEntry配置IIS7出現(xiàn)ADSI Error:未知錯(cuò)誤(0x80005000)的解決辦法

一、錯(cuò)誤情況

環(huán)境:win7+iis7.0

DirectoryEntry配置IIS7出現(xiàn)如下錯(cuò)誤

或者是

下面一段代碼在IIS6.0下運(yùn)轉(zhuǎn)正常,但I(xiàn)IS7.0下運(yùn)轉(zhuǎn)會(huì)出錯(cuò):

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

異常內(nèi)容如下:

[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)

二、錯(cuò)誤分析

這段異常代碼表明 IIS://localhost/W3SVC/1 的ADSI provider不存在或者無(wú)法訪問(wèn)。

打開(kāi)IIS管理器你可以看到服務(wù)器的localhost(即默認(rèn)站點(diǎn))是存在的并正在運(yùn)行,且主站點(diǎn)ID確實(shí)是1。這說(shuō)明問(wèn)題是出現(xiàn)在 IIS://localhost的ADSI provider。

三、錯(cuò)誤原因

win7使用的是iis7,而IIS 7默認(rèn)并沒(méi)有安裝ADSI provider。

四、解決方法

要解決這個(gè)問(wèn)題就得安裝“IIS 元數(shù)據(jù)庫(kù)和IIS 6配置兼容性”。

“控制面板”->“程序和功能”->面板左側(cè)“打開(kāi)或關(guān)閉windows功能”->“Internet信息服務(wù)”->“Web管理工具”->“IIS 6管理兼容性”->“IIS 元數(shù)據(jù)庫(kù)和IIS 6配置兼容性”。

如下圖所示:

 五、Windows Server 2008出現(xiàn)這種錯(cuò)誤怎么辦?

在Windows Server 2008下,使用角色服務(wù)安裝完“IIS 元數(shù)據(jù)庫(kù)和IIS 6配置兼容性”,還有可能出現(xiàn)如下錯(cuò)誤: 

[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)

這是因?yàn)?Windows Server 2008被UAC(User Account Control,用戶賬戶控制)鎖定了.  你需要用管理員(Administrator)賬戶執(zhí)行這個(gè)程序. 另一種方式是設(shè)置運(yùn)行此程序的賬戶擁有如下權(quán)限: Logon as a Service"/ "Logon as a Batch Job"

 以上就是解決DirectoryEntry配置IIS7出現(xiàn)ADSI Error錯(cuò)誤的方法,還有引申出來(lái)的Windows Server 2008出現(xiàn)這種錯(cuò)誤的解決辦法,希望對(duì)大家解決這類問(wèn)題有所幫助。

相關(guān)文章

最新評(píng)論