欧美大屁股bbbbxxxx,狼人大香伊蕉国产www亚洲,男ji大巴进入女人的视频小说,男人把ji大巴放进女人免费视频,免费情侣作爱视频

歡迎來到入門教程網(wǎng)!

C#教程

當(dāng)前位置:主頁 > 軟件編程 > C#教程 >

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

來源:本站原創(chuàng)|時(shí)間:2020-01-10|欄目:C#教程|點(diǎn)擊: 次

一、錯(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不存在或者無法訪問。

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

三、錯(cuò)誤原因

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

四、解決方法

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

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

如下圖所示:

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

在Windows Server 2008下,使用角色服務(wù)安裝完“IIS 元數(shù)據(jù)庫和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ò)誤的方法,還有引申出來的Windows Server 2008出現(xiàn)這種錯(cuò)誤的解決辦法,希望對(duì)大家解決這類問題有所幫助。

網(wǎng)頁制作CMS教程網(wǎng)絡(luò)編程軟件編程腳本語言數(shù)據(jù)庫服務(wù)器

如果侵犯了您的權(quán)利,請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)進(jìn)行處理、任何非本站因素導(dǎo)致的法律后果,本站均不負(fù)任何責(zé)任。

聯(lián)系QQ:835971066 | 郵箱:835971066#qq.com(#換成@)

Copyright © 2002-2020 腳本教程網(wǎng) 版權(quán)所有