Monday, March 10, 2008 - 文章

TIPS-Failed to Access IIS Metabase

小事一件,不過前後已經遇到很多次(今天又發現一起),看來也算常見問題,索性整理一下我的處理心得給大家參考。

錯誤訊息如下:

中文版

無法存取 IIS Metabase。
描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。
例外詳細資訊: System.Web.Hosting.HostingEnvironmentException: 無法存取 IIS Metabase。
用來執行 ASP.NET 的處理序帳戶必須擁有 IIS Metabase (例如 IIS://servername/W3SVC) 的讀取權限。如需修改 Metabase 使用權限的詳細資訊,請參閱
http://support.microsoft.com/?kbid=267904

英文版

Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Hosting.HostingEnvironmentException: Failed to access IIS metabase.
The process account used to run ASP.NET must have read access to the IIS metabase (e.g. IIS://servername/W3SVC). For information on modifying metabase permissions, please see
http://support.microsoft.com/?kbid=267904.


常見情境:

  • 已經安裝好.NET Framework 2.0的機器,事後才加裝IIS
  • IIS被移除重裝過

一般來說,安裝.NET Framework 2.0時,若安裝程式偵測到機器上有IIS,會向IIS註冊以便能執行ASP.NET 2.0。若先裝了.NET 2.0才裝IIS,就漏掉這個一註冊ASP.NET程序了(不過就算沒註冊,IIS的應用程式選項裡還是可以看到ASP.NET 2.0,讓人誤以為ASP.NET 2.0已 裝好,又一個陷阱),必須手動執行,如下:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regiis.exe -i

(PS: 完全不知道上面這行在搞什麼飛機或是重註冊無效的朋友,可以試看看執行.NET 2.0修復)

本來只是個小問題,不過由於錯誤訊息給得不甚明確,又扯了一堆W3SVC, IIS Metabase看似可怕的名詞,最後還扯到了權限問題,應該嚇壞一堆裝好IIS正要埋頭開始學ASP.NET的熱血新人。網路上看到不少人問了這個問題,就用這篇文章讓Google查詢"無法存取IIS Metabase"的傳回結果多一則吧!

TIPS-SideBySide Error Event

有台機器不定期出現以下錯誤:

  • Source: SideBySide
    Event ID: 59

    Resolve Partial Assembly failed for Microsoft.VC80.CRT.mui. Reference error message: Access is denied.
  • Source: SidebySide
    EventID: 59

    Generate Activation Context failed for D:\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\bin\msmdctr90.DLL. Reference error message: Access is denied.

查詢了一下,很幸運地找到一篇相同的問題,並且有Microsoft Online Community Support的回答。

依據文中的說法,問題出在Performance Log Users群組對
\Program Files\Microsoft SQL Server\MSSQL.1\mssql\binn
\Program Files\Microsoft SQL Server\MSSQL.2\OLAP\bin

兩個目錄沒有讀取權限。檢查的結果,MSSQL.1\mssql\binn權限OK,但MSSQL.2\OLAP\bin的確沒有授予權限給Performance Log Users群組。

另外,在同一台機器上我還發現了一大堆Performance Counter Error Event: (有些可能與前面的權限問題有關,有些看起來又不像)

  • Source: Perflib
    Event ID: 1008

    The Open Procedure for service "ContentFilter" in DLL "C:\WINDOWS\System32\query.dll" failed. Performance data for this service will not be available. The Status code returned is the first DWORD in the attached data.
  • Source: Perflib
    Event ID: 1005

    Windows cannot access the file 푸ǖ for one of the following reasons: there is a problem with the network connection, the disk that the file is stored on, or the storage drivers installed on this computer; or the disk is missing. Windows closed the program C:\WINDOWS\system32\sqlctr90.dll because of this error.
    Program: C:\WINDOWS\system32\sqlctr90.dll
    File: 푸ǖ
    The error value is listed in the Additional Data section...(後略)
  • Source: Perflib
    Event ID: 1018

    Performance counter data collection from the "MSSQL$MICROSOFT##SSEE" service has been disabled for this session due to one or more errors generated by the performance counter library for that service. The error(s) that forced this action have been written to the application event log.
  • Source: Perflib
    Event ID: 1023

    Windows cannot load extensible counter DLL MSSQLServerOLAPService, the first DWORD in data section is the Windows error code.

Performance Counter的Error問題還挺常見的,今天找到Windows 2000 Resource Kit裡有個exctrlst.exe工具可以列出及停用某些損壞的Performance Counter,只要眼不見為淨,不失為一個良好的鋸箭法。

【下載】Extensible Performance Counter List(exctrlst.exe)
http://www.microsoft.com/downloads/details.aspx?familyid=7ff99683-b7ec-4da6-92ab-793193604ba4&displaylang=en

搜尋

Go

<March 2008>
SunMonTueWedThuFriSat
2425262728291
2345678
9101112131415
16171819202122
23242526272829
303112345
 
RSS
【工商服務】
最新回應

Tags 分類檢視
關於作者

一個醉心技術又酷愛分享的Coding魔人,十年的IT職場生涯,寫過系統、管過專案, 也帶過團隊,最後還是無怨無悔地選擇了技術鑽研這條路,近年來則以做一個"有為的中年人"自許。

文章典藏
其他功能

這個部落格


BlogLook Score and Rank

Syndication