.net core 環境配置
出現這種狀況請 下載
https://dotnet.microsoft.com/download/thank-you/dotnet-runtime-2.2.3-windows-hosting-bundle-installerhtml
再關閉本地調試的IIS託管程序 再從新啓動VS程序vue
若是使用的空模板創建的.net core webapi程序 須要出現wwwwroot(新建一個文件夾就能夠了)
若是須要訪問裏面的文件 在startup.cs裏面 的Configur 裏面設置 app.UseStaticFiles(); 就能夠了
若是須要自定義StaticFiles 中間件 請參考
https://www.baidu.com/link?url=qsTi_WyUkzeNxhEsqMsHjnFW5t3qzEuWpiRN4qSTE2egTm6P2vnad3OwhmipEV7OuCxFdq98Z8uduPtrPRHU5q&wd=&eqid=945fc050000673f1000000065c9f1533ios
vue-element-admin
1.關於使用.net core webapi 401 500 (沒有自定義錯誤) axios路由攔截器沒法攔截到的緣由
response => response ,// 這句話註釋掉,這裏的意思是先把respons 返回給 處理接口的函數 再執行 response=>{ } 裏面的攔截事件 因此註釋掉後 先執行攔截函數
以後 return response
response => {
xxxxx
}web
.net core 自定義 401 和500 錯誤 返回json 數據
分兩步 聲明中間件 註冊中間件
參考文章
http://www.javashuo.com/article/p-ugtjmrby-er.htmljson