1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Slussfors, Lapland, Sweden
    Posts
    10
    Vote Rating
    0
    Answers
    2
    stefanlaketa is on a distinguished road

      0  

    Default Answered: Getting a 405 (Method not allowed) error when doing a JSON POST to WCF service

    Answered: Getting a 405 (Method not allowed) error when doing a JSON POST to WCF service


    (All the below has also been tried on my local machine, Win7, with the same results.)
    We have a WCF web service configured to use JSON calls hosted on our own IIS 7 server.
    When I'm doing GETs there are no issues and I can output the result nicely in a list, but whenever I'm doing a POST call to the service I get a 405 returned with "Method not allowed".

    I have tried creating objects via Chrome's console and save them -> same result.
    I have tried doing a POST call via Fiddler -> same result.
    I have even tried doing a "curl -d" call via my Mac OS X machine -> same result.

    The app and web service are on the same domain, so I'm using RestProxy.

    [edit]When doing the GET call, the URL is like this: /Service/Models/?_dc=1315992759830...
    but when doing the POST call, the URL is like this: /Service/Models/undefined?_dc=...
    Where does this undefined come from?
    PS. Service and Model are not the real names, they're just for this example.
    [/edit]

    Has anyone any idea how to solve this?

    I have searched on Google, on stackoverflow, but haven't found any solutions.
    Last edited by stefanlaketa; 14 Sep 2011 at 1:35 AM. Reason: Added info about undefined

  2. Ok, I managed to find where that undefined came from. I forgot to set a idProperty in my Model.

    (I have some other issues now, but I think this resolved the problem I described in this post.)

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Location
    Slussfors, Lapland, Sweden
    Posts
    10
    Vote Rating
    0
    Answers
    2
    stefanlaketa is on a distinguished road

      0  

    Default


    Ok, I managed to find where that undefined came from. I forgot to set a idProperty in my Model.

    (I have some other issues now, but I think this resolved the problem I described in this post.)

Tags for this Thread