405 method not allowed Web API

前端 未结 21 1641
栀梦
栀梦 2020-11-27 18:33

This error is very common, and I tried all of the solutions and non of them worked. I have disabled WebDAV publishing in control panel and added this to my web config file:<

21条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 18:55

    I'm late to this party but as nothing above was either viable or working in most cases, here is how this was finally resolved for me.

    On the server the site/service was hosted on, a feature was required! HTTP ACTIVATION!!!

    Server Manager > Manage > Add Roles and Features > next next next till you get to Features > Under .NET (each version) tick HTTP Activation. Also note there is one hidden under >net > WCF Services.

    This then worked instantly! That was melting my brain

提交回复
热议问题