none
oData Service consume in Android Phone RRS feed

  • Question

  • Hi,

      I have created a oData WCF Service and hosted in IIS 7 in my Windows 7. Then I have consumed that service in my Android application. I can get entity and insert entity . But I can not update or delete entity. I am getting below error -

    • The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used.
    • The request sent to the Web server used an HTTP verb that is not allowed by the module configured to handle the request.
    • A request was sent to the server that contained an invalid HTTP verb.
    • The request is for static content and contains an HTTP verb other than GET or HEAD.
    • A request was sent to a virtual directory using the HTTP verb POST and the default document is a static file that does not support HTTP verbs other than GET or HEAD.

    I have checked in IIS Handler Mapping that Path .svc has all Verb included. Please help me.

    Regards-

    Prasenjit Saha

    HCL Technologies Ltd.

    Friday, August 30, 2013 12:56 PM

Answers

  • Hi,

    This is typical to IIS 7 which has WebDAVModule installed by default which is causing this behavior and not recognizing PUT (and also DELETE) as valid Http verbs.

    The solution is to modify your web.config file with following and removing this module in the process.

     <system.webServer>
        <modules>
        <remove name="WebDAVModule" />
        </modules>
      </system.webServer>
    
    Best Regards,
    Amy Peng

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Prasenjit Saha Tuesday, September 3, 2013 6:23 AM
    Monday, September 2, 2013 1:59 AM
    Moderator

All replies

  • Hi,

    This is typical to IIS 7 which has WebDAVModule installed by default which is causing this behavior and not recognizing PUT (and also DELETE) as valid Http verbs.

    The solution is to modify your web.config file with following and removing this module in the process.

     <system.webServer>
        <modules>
        <remove name="WebDAVModule" />
        </modules>
      </system.webServer>
    
    Best Regards,
    Amy Peng

    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by Prasenjit Saha Tuesday, September 3, 2013 6:23 AM
    Monday, September 2, 2013 1:59 AM
    Moderator
  • Hi,

    Thank you for yor reply. I have included the above in web.config. But still I am unable to update \ delete entity. Get and insert is working fine. I am getting below error -

    java.io.IOException:No authentication challenges found

    Thanks

    Prasenjit Saha


    Prasenjit Saha

    Monday, September 2, 2013 5:54 AM