Asp.net-Mvc

如何使 ASP.NET MVC 在 IIS 6 中工作?

  • May 15, 2013

我已經在 Windows Server 2003 R2 機器中安裝了 .NET Framework 3.5 SP1 和 ASP.NET MVC CTP,但我的 ASP.NET MVC 站點仍然無法在該伺服器上執行。我在 Internet 和 IIS 上搜尋解決方案,我注意到我不能為我的虛擬目錄選擇除 2.0 之外的其他 .NET Framework 版本。我幾乎可以肯定,如果我糾正這個問題,我可以讓我的網站在那里工作。

目前主要的“/”網址回答:

Directory Listing Denied
This Virtual Directory does not allow contents to be listed.

“/Default.aspx” URL 回答如下:

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Section or group name 'system.web.extensions' is already defined. 

Phil Haack 在這裡有一篇很好的文章

http://haacked.com/archive/2008/11/26/asp.net-mvc-on-iis-6-walkthrough.aspx

我有類似的問題。

  1. 我最近升級了我的伺服器以支持 .net framework 4.0。
  2. 將我的應用程序轉換為支持 .net fx 4.0。
  3. 在伺服器上部署應用程序並嘗試測試.. 我收到“HTTP 錯誤 404 - 找不到文件或目錄”

解決方案

  1. 打開 IIS 管理器,展開主伺服器節點(即 Servername 節點),然後選擇 Web 服務擴展節點。
  2. 在 IIS 管理器的右窗格中,右鍵點擊副檔名“ASP.NET v4.0.*”。
  3. 點擊允許按鈕。

引用自:https://stackoverflow.com/questions/628236