IIS部屬ASP.NET MVC5
發佈程式
程式包裡面會有下面的檔案,MVC是透過預設路由來指定首頁,所以沒有.html檔案

IIS設定
站台名稱:此網站應用程式在IIS的站台名稱
實體路徑:上一個步驟發佈後產出的程式包的實體路徑
連接埠:設定一個80port以外的埠號
IP位址:不指定的話,預設為localhost

設定好後,點選瀏覽網頁

HTTP錯誤 500.19
結果出現了這個錯誤。

爬了一下文,應該是沒有安裝ASP.NET 4.8應用程式集區的問題(ChatGTP Keyword:win 11 iis 安裝asp.net 應用程式集區)。依照下列步驟開啟相關設定。

網站首頁成功部屬到IIS上,並且run起來了!!

新增應用程式
新增虛擬目錄
上傳路徑用