幾個開發中遇到的問題及解決辦法

2022-08-27 05:39:10 字數 841 閱讀 2407

1 statuscode: 404, reasonphrase: 'not found', version: 1.1

解決辦法:將請求中的localhost 改為實際的ip

2 httpclient 無法呼叫postasjsonasync()方法

解決辦法:新增system.net.http.formatting的依賴引用

3:asp.net core webapi客戶端訪問controller時找不到物件的方法,報出錯誤:

ambiguousactionexception: multiple actions matched. the following

actions matched route data and had all constraints satisfied:

mydemo.controllers.plancontroller.get (mydemo)

mydemo.controllers.plancontroller.acd (mydemo)

解決辦法: 在方法上新增路由 例如:

我嘗試了各種各樣的方法,例如網上講的新增

等等 ,都不管用。

解決辦法:最後我將webapiconfig.registerglobalconfiguration.configuration); 注釋掉了,暫時解決了此問題。這並不是乙個完美的解決辦法,不過暫時我沒找到更好的辦法

Debian 遇到的問題及解決辦法

1,bash fdisk command not found 安裝完ntfs驅動後,fdisk命令不能用了 fc5 bash fdisk command not found 錯誤 2007 06 02 04 21 p.m.錯誤原因是 sbin的目錄路徑 系統使用者目錄 不在root的 path變數中...

xcode遇到的問題及解決辦法

總結一些在使用xcode中遇到的問題及解決辦法 不定時更新 一 解決 xcode 中http 請求不能訪問 二 解決 xcode 中arc 與非arc 之間的轉換 非arc轉變為arc 在控制開關中新增 fobjc arc 以arc進行編譯。arc轉變為非arc fno objc arc 三 解決 ...

Pytorch使用中遇到的問題及解決辦法(更新中)

pytorch學習小白,跑大佬們的源 時難免遇到 意想不到 的問題,有過心酸崩潰路,但感恩各位大佬文章的啟發幫助,一路摸爬滾打,有了起色。現整理自己學習過程中遇到的問題,方便你我他參考 問題1.pytorch訓練時gpu視訊記憶體突增,崩潰,報錯 out of memory 解決思路 對占用gpu視...