IIS 7.5上的ASP.NET MVC - ASP.NET MVC on IIS 7.5

語言: CN / TW / HK

問題:

I'm running Windows 7 Ultimate (64 bit) using Visual Studio 2010 RC. 我使用Visual Studio 2010 RC執行Windows 7旗艦版(64位)。 I recently decided to have VS run/debug my apps on IIS rather than the dev server that comes with it. 我最近決定在IIS上執行/除錯我的應用程式,而不是隨附的dev伺服器。

However, every time I try to run an MVC app, I get the following error: 但是,每次我嘗試執行MVC應用程式時,都會收到以下錯誤:

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. HTTP錯誤403.14 - 禁止Web伺服器配置為不列出此目錄的內容。 Detailed 詳細

Error Information 錯誤資訊

Module DirectoryListingModule 模組DirectoryListingModule

Notification ExecuteRequestHandler 通知ExecuteRequestHandler

Handler StaticFile Error 處理程式StaticFile錯誤

Code 0x00000000 Requested 程式碼0x00000000請求

URL http://localhost:80/mySite/ URL http:// localhost:80 / mySite /

Physical Path C:\\myProject\\mySite\\ 物理路徑C:\\ myProject \\ mySite \\

Logon Method Anonymous Logon 登入方法匿名登入

User Anonymous 使用者匿名

I placed a default.aspx file in the directory and I received the following error: 我在目錄中放置了default.aspx檔案,我收到以下錯誤:

HTTP Error 500.21 - Internal Server Error Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list HTTP錯誤500.21 - 內部伺服器錯誤處理程式“PageHandlerFactory-Integrated”在其模組列表中有一個錯誤的模組“ManagedPipelineHandler”

Are there any other steps I forgot to take to get this working? 有沒有其他步驟我忘了採取這個工作?

Notes: I installed IIS 7.5 after installing VS 2010 RC. 注意:我在安裝VS 2010 RC後安裝了IIS 7.5。 I used the built-in "Create Virtual Directory" button under the "Web" tab in the MVC project's "Properties" in Visual Studio 2010. I made sure that the application is using the ASP.NET 4 App Pool. 我使用了Visual Studio 2010中MVC專案的“屬性”中“Web”選項卡下的內建“建立虛擬目錄”按鈕。我確保該應用程式使用的是ASP.NET 4應用程式池。

Below are the installed features of IIS I have. 以下是我所擁有的IIS的已安裝功能。

替代文字


解決方案:

參考一: https://stackoom.com/question/9xpl
參考二: ASP.NET MVC on IIS 7.5
「其他文章」