Asp.Net MVC4 + Web API Controller Delete request >> 404 error

后端 未结 4 1867
一向
一向 2021-01-04 02:58

I have a VS2012 MVC4 solution where I test Web API Controllers.

I successfully tested the GET, POST, PUT but the DELETE still got me an http 404 error. When I set a

4条回答
  •  轮回少年
    2021-01-04 03:35

    If the error you are receiving is an html content type from IIS, error 404.0

    Make sure you have the section in your web.config that is added by the Web Api template. By default IIS will not serve the DELETE verb, and this config overrides the behavior.

      
        
          
          
          
          
          
          
        
      
    

提交回复
热议问题