簡體   English   中英

無法運行 web api(網關)項目 - 找不到此本地主機頁面。 未找到該網址的網頁:

[英]Unable to run web api (gateway) project - This localhost page can’t be found. No webpage was found for the web address:

我正在嘗試設置和運行這個 git 項目 - https://github.com/johnph/simple-transaction#WebApi-Endpoints

我已成功清理並重新構建整個解決方案。 我已成功配置為執行 EF Core Code-First 遷移,並且成功創建了包含 2 個表的數據庫:

  • 賬戶交易
  • 帳戶匯總

我可以運行 Transaction.WebApi 它打開http://localhost:60243/swagger/index.html 但是,我無法運行其他 2 個 web api 項目:Gateway.WebApi 或 Identity.WebApi。 發生的錯誤是This localhost page can't be found. No webpage was found for the web address: This localhost page can't be found. No webpage was found for the web address:

我可以啟動 SimpleBanking.ConsoleApp 項目。 測試數據為\\src\\Services\\Identity\\Services\\UserService.cs。 但它返回Object reference not set to an instance of an object. App interrupted. App closed. Object reference not set to an instance of an object. App interrupted. App closed.

我能夠成功運行這個項目。

確保您運行 3 個服務器 Gateway.WebApi、Identity 和 Transaction。

只有這樣你才能運行控制台應用程序。

在 Console 中即使你輸入了錯誤的用戶名或密碼,系統仍然會告訴你登錄成功,這有誤導性。 然后,當您選擇以下選項之一時:

你調用的對象是空的。 應用程序中斷。 應用程序關閉。

確保監控日志中的錯誤

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM