原文:No 'Access-Control-Allow-Origin' header is present on the requested resource——Web Api跨域問題

最近使用C 寫了一個簡單的web api項目,在使用項目中的.cshtml文檔測試的時候沒有任何問題,但是在外部HBuilder上面編寫.html通過Ajax調用web api路徑時報錯: No Access Control Allow Origin header is present on the requested resource. 導致這個問題的原因是在跨域訪問web api的api時,C ...

2019-03-29 21:21 1 7391 推薦指數:

查看詳情

 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM