IIS 錯誤訊息:”無法存取 IIS Metabase”

執行 aspx 時發生”無法存取 IIS Metabase”
標籤: ASP.NET
為了練習撰寫 ASP.NET 網頁
我用我的電腦裝了 IIS 並測試程式
誰知卻一直無法正常運作
錯誤訊息顯示”無法存取 IIS Metabase”
“描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。 “
“例外詳細資訊: System.Web.Hosting.HostingEnvironmentException: 無法存取 IIS Metabase。 “
試了好多次都是一樣
為此還是不得不求助 Google
也順利找到解決辦法
記錄在此:
會發生這錯誤是因為先安裝了 Visual Studio 開發工具
之後才安裝 IIS 因此產生錯誤
所以只要把 ASP.NET 重新安裝並更新 IIS 的 Scriptmap 就可以了
那要怎麼做咧?
1. 打開命令列視窗
2. 切換路徑到 WINDOWS 安裝路徑下的 \Microsoft.NET\Framework\(版本)
3. 執行 aspnet_regiis -i 並稍等它執行完畢
問題就解決了
( .NET 3.5 是根據 2.0去做擴充的, 所以要去找 2.0 的版本才找得到這檔案)
補充:
aspnet_regiis 是在本機電腦上安裝及解除安裝 ASP.NET 的管理公用程式
參數 -i 會安裝該版本的 ASP.NET,並且更新位於 IIS Metabase 根目錄的 Scriptmap 以及根目錄下的所有 Scriptmap。較低版本的現有 Scriptmap 都會更新成這個版本。
由 Ed 寫於 16:30

metabase

我將之前寫的網站移植的時候遇到 “無法存取 IIS Metabase”

錯誤訊息

“無法存取 IIS Metabase”

“描述: 在執行目前 Web 要求的過程中發生未處理的例外情形。請檢閱堆疊追蹤以取得錯誤的詳細資訊,以及在程式碼中產生的位置。 ”

“例外詳細資訊: System.Web.Hosting.HostingEnvironmentException: 無法存取 IIS Metabase。 ”

找了 google 說是先安裝 .NET framework 再裝 IIS 就會發生此問題

本來想說把 .NET  framework 移除再裝, 但是不給移, 說是有很多應用程式用到

然後 .NET  framework 2.0 sp2 也是目前 2.0 最新版, 不能再更新

後來找到方法, 紀錄一下

解決方法 – ASP.NET 重新安裝並更新 IIS 的 Scriptmap

1. 開始 > 執行 cmd

2. 切換目錄到 WINDOWS 安裝路徑下的 \Microsoft.NET\Framework\(版本)

3. 執行 aspnet_regiis -i 並稍等它執行完畢

ok, 搞定….

補充:

( .NET 3.5 是根據 2.0去做擴充的, 所以要去找 2.0 的版本才找得到這檔案)

aspnet_regiis 是在本機電腦上安裝及解除安裝 ASP.NET 的管理公用程式

參數 -i 會安裝該版本的 ASP.NET,並且更新位於 IIS Metabase 根目錄的 Scriptmap 以及根目錄下的所有 Scriptmap。較低版本的現有 Scriptmap 都會更新成這個版本。

26 comments

  1. First off I want to say wonderful blog! I had
    a quick question that I’d like to ask if you don’t mind.
    I was curious to know how you center yourself and
    clear your head prior to writing. I’ve had a tough time
    clearing my thoughts in getting my thoughts out there.
    I do take pleasure in writing however it just
    seems like the first 10 to 15 minutes are generally wasted just trying to figure out how to begin. Any recommendations or hints?
    Thanks!

  2. My programmer is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the costs.
    But he’s tryiong none the less. I’ve been using WordPress on a number of websites for about a
    year and am nervous about switching to another platform.
    I have heard great things about blogengine.net. Is there
    a way I can import all my wordpress content into it?
    Any kind of help would be really appreciated!

  3. Superb blog! Do you have any tips for aspiring writers?
    I’m planning to start my own website soon but
    I’m a little lost on everything. Would you suggest starting with a free platform like WordPress or go for a paid option? There are so many choices out
    there that I’m totally confused .. Any recommendations?
    Appreciate it!

  4. Someone essentially assist to make critically posts I might state.

    That is the first time I frequented your web page and to this point?
    I surprised with the research you made to create this particular publish amazing.

    Excellent job!

  5. Very nice post. I just stumbled upon your weblog and wanted
    to say that I have truly enjoyed surfing around your blog posts.
    In any case I will be subscribing to your feed and I hope you write again soon!

  6. You actually make it seem so easy with your presentation but I find this
    topic to be really something that I think I would never
    understand. It seems too complicated and very broad for
    me. I am looking forward for your next post, I’ll try to get the hang of it!

  7. Just desire to say your article is as amazing. The clearness in your
    post is just spectacular and i could assume you’re an expert on this subject.

    Well with your permission allow me to grab your feed to keep up
    to date with forthcoming post. Thanks a million and please carry on the enjoyable work.

發表迴響

你的電子郵件位址並不會被公開。

*