Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nadine Fisch 159 posts 429 karma points
    Jun 15, 2018 @ 11:37
    Nadine Fisch
    0

    The requested resource does not support HTTP method 'GET'

    Hi,

    my API-method is decorated with

     [System.Web.Http.AcceptVerbs("GET", "POST")]
     [System.Web.Http.HttpGet]
    

    But I still get "The requested resource does not support HTTP method 'GET'" message, if i request the url in the browser?

    Can someone please help me?

    Thank you,

    Nadine

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jun 15, 2018 @ 13:01
    Nik
    1

    Hey Nadine,

    Have you got any redirects that do things like force lowercase or remove trailing slashes?

    I've normally seen that error message when a request is getting redirected so it could be worth checking that :-)

    Thanks,

    Nik

  • Raluca Dumitru 33 posts 174 karma points
    Dec 12, 2018 @ 12:42
    Raluca Dumitru
    0

    Hi Nik,

    Can you please give more details on how you can check this? I am trying to login, after moving the website to a different server, and I cannot.

    I have seen that in the console I get the same message as Nadine.

    Can you help?

    Thanks

  • Nadine Fisch 159 posts 429 karma points
    Dec 12, 2018 @ 14:09
    Nadine Fisch
    0

    there is a UrlRewriting.config in the config-folder. We also have a config for iis-rules in the root-folder. Maybe you find your problem there.

    But I can't remember what the problem was for me.

    I remember I inherited from the wrong APi-Controller. For now, I am inheriting from UmbracoApiController and allow the method to be called by anonymous by adding this attribute above the method

    [AllowAnonymous]
    

    We had also a IIS rule that block all Backend-Urls, so I have to adust this also to make it public. The UmbracoApiController is inside the Umbraco Backend (everything under /umbraco).

Please Sign in or register to post replies

Write your reply to:

Draft