MVC Web API posting JSON data gives me a 404

前端 未结 2 1753
没有蜡笔的小新
没有蜡笔的小新 2021-01-25 09:33

I have a Web API in MVC4. I\'m getting a 404 when posting data using ajax and I don\'t understand why.

LanguageController:

[AcceptVerbs(\"POST\")]
public         


        
2条回答
  •  梦谈多话
    2021-01-25 09:54

    The file name of the code public void Delete(string id) should be named "languageController". Pls check the name

    Also, the better way to use Delete action should be in "Delete" rather than "Post"

提交回复
热议问题