Copied to clipboard

Flag this post as spam?

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


  • Dan 1288 posts 3921 karma points c-trib
    Sep 02, 2010 @ 10:59
    Dan
    0

    Base returnXml="false" not working

    Hi,

    I just wondered if anyone else had this issue with 4.5.2, in that when calling a base url, like this:

    <RestExtensions>
    <ext assembly="/MyBaseProject" type="MyBase.UpdateValue" alias="Update">
    <permission method="Hello" returnXml="false" allowAll="true" />
    </ext>
    </RestExtensions>

    The returnXML="false" doesn't seem to stop the application returning XML.  It seems to be ignored and returns the output inside a <value></value> tag.

    Perhaps I'm doing something silly, but I just thought I'd check to see if anything has changed in 4.5.x with regards to this, as I know some of the documentation is a little out of date for base and 4.5.x.

  • Julius Bartkus 51 posts 76 karma points
    Jan 15, 2011 @ 19:34
    Julius Bartkus
    0

    I am experiencing the same issue in 4.6.1 (Juno) version. 

    I use returnXml=false directly in the .cs file in App_code directory

    [RestExtension("rest")]
    public class RESTService
    {
        [RestExtensionMethod(returnXml = false)]

    however the result is returned together with <value></value> element.

    Does anyone experience the same issue or knows how to solve it?

    Thanks,
    Julius Bartkus

  • Lachlann 344 posts 626 karma points
    Jun 09, 2011 @ 23:40
    Lachlann
    0

    Hi there yes I seem to be getting the same issue I have

    returnXml="false"

    In the restConfig but it still returns XML any help would be very much appreciated.

     

    L

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Jun 09, 2011 @ 23:57
    Thomas Höhler
    100

    Did you reload the config settings e.g. via touching the web.config or recycling the app pool?

    Thomas

  • Richard Soeteman 4047 posts 12900 karma points MVP 2x
    Jun 10, 2011 @ 01:52
    Richard Soeteman
    0

    Had this working in 4,5,2 what's the  type that your method is returning, string/int? and restart your app as Thomas suggested

    Cheers,

    Richard

  • Lachlann 344 posts 626 karma points
    Jun 11, 2011 @ 16:47
    Lachlann
    0

    Hey guys yeah i tried touching the web config and my method is returning a string.

    bit stumped im sure i must just be mssing something obvious.

     

    L

  • Lachlann 344 posts 626 karma points
    Jun 11, 2011 @ 17:01
    Lachlann
    0

    Okay figured it out, new it would be something i had missed :) my entry in the rest extension config was calling th wrong alias, but my code was using the method defined here:

     

    http://our.umbraco.org/wiki/reference/umbraco-base/simple-base-samples

    I dont think the rest config was even being used.

     

    Thanks for your help guys!

     

    L

Please Sign in or register to post replies

Write your reply to:

Draft