Copied to clipboard

Flag this post as spam?

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


  • Wouter Benoit 2 posts 22 karma points
    Feb 21, 2012 @ 12:34
    Wouter Benoit
    0

    Select nodes from umbraco on server

    Hi all,

    We currently have multiple Umbraco sites running on our server.
    There is a central container to store news and events items that are created in the Umbraco backend.
    We have a website that is not made in Umbraco that should reference those news and event container nodes.
    The website will be running on a different server.
    And the logic to collect the correct nodes is written with C#, so the webservice can use these dll's

    For the current websites I select the event container like this 
    Node eventContainer = Node.GetNodeByXpath("//ancestor-or-self::*/EventsContainer");

    My question is, how can I select that same node but from a different location.
    I thought I could get this by prefixing the IP address of the server like 

    Node eventContainer = Node.GetNodeByXpath("ipaddress/umbraco root folder //ancestor-or-self::*/EventsContainer");

    but that gives a 'not nodeset' error

    Can anyone give me a proper example how this can be fixed?

    Thanks in advance

     

    Greetz

  • Richard 146 posts 168 karma points
    Feb 22, 2012 @ 14:43
    Richard
    0

    An alternative approach, could you create an RSS feed on the Umbraco server to expose the news and event details, and then consume this feed on the other non-Umbraco server? You could use IIS manager and its Directory Security settings to stop other IP addresses access this feed if you want to protect the information on the feed.

    Richard

  • Wouter Benoit 2 posts 22 karma points
    Feb 24, 2012 @ 15:31
    Wouter Benoit
    0

    An RSS feed could be a possible solution. Thanks for the info.

    But we took another approach by quering directly to the Umbraco content xml file through a webservice.
    Works fine, and our problems are solved.

Please Sign in or register to post replies

Write your reply to:

Draft