發表文章
目前顯示的是 2023的文章
解決 ASP.NET Core The Development environment shouldn't be enabled for deployed applications 問題
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
今天發布專案後瀏覽網頁,出現了錯誤訊息 Error. An error occurred while processing your request. Request ID: 00-0db8ab846988d425dedca4ad62815575-d671b532783951b3-00 Development Mode Swapping to Development environment will display more detailed information about the error that occurred. The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app. 如果想看到詳細的錯誤訊息,要網址資料夾下,打開 web.config 原始的內容長這樣 在 aspNetCore 標籤中加入 <environmentVariables> <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> </environmentVariables> 如下圖所示 儲存後重新整理網頁,就可以看到詳細的錯誤訊息囉! {"errdesc":"A network-related or instance-s...
解決 Visual Studio 2022 找不到 ASP.NET Web 應用程式 (.NET Framework) 專案問題
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式