如何解决“405(方法不允许)”在角js 1? [英] How to solve "405 (method not allowed)" in angular js 1?

查看:82
本文介绍了如何解决“405(方法不允许)”在角js 1?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前,我正在向WEB API发帖请求,我在控制台中收到以下错误。



GET http:// localhost:56800 / api / KendoGridAPI 405(方法不允许)



我尝试过:



i尝试在标题中添加Access-Control-Allow-Origin:并在webapiconfig中启用CORS但是,我仍然收到此错误。

Currently, I'm making a post request to WEB API and I'm getting following error in console.

GET http://localhost:56800/api/KendoGridAPI 405 (Method Not Allowed)

What I have tried:

i tried adding Access-Control-Allow-Origin: in headers and enabling CORS in webapiconfig but still, i'm getting this error.

推荐答案

检查以下内容请问你的问题。



在发布Web API 2应用程序后排除HTTP 405错误Microsoft Docs [ ^ ]
Check if below hepls you with your question.

Troubleshooting HTTP 405 Errors after Publishing Web API 2 Applications | Microsoft Docs[^]


这篇关于如何解决“405(方法不允许)”在角js 1?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆