More in this section

Forums / Developing with Sitefinity / Expose pages to other applications

Expose pages to other applications

4 posts, 1 answered
  1. Peter Meir
    Peter Meir avatar
    2 posts
    Registered:
    25 Aug 2009
    25 Aug 2009
    Link to this post
    Hi,

    I have enjoyed the tips & tricks video on the API of SiteFinity and with a new project for a client in mind I have a question.
    My client wants to have an application that consumes articles from the CMS. This application will only be available on the intranet, while the CMS should be publicly available and should therefore be physically located on another server.

    Would it be possible to expose a whole page or a list of articles to an outside application? And what would be the most efficient and secure way of doing this. The link between the two needs to be direct so that when the article is updated on the CMS, it should also be updated in the custom built application.


    Thank you in advance!

    Peter
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Aug 2009
    Link to this post
    Hello Peter Meir,

    1. You can create a web services to the website.
    2. If you need something simple as just list of articles you can create a user control and populate it with data from the database.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Peter Meir
    Peter Meir avatar
    2 posts
    Registered:
    25 Aug 2009
    25 Aug 2009
    Link to this post
    Hi,

    Thanks for the quick reply! 
    I would prefer not to work directly on the database as it might prevent the CMS from being upgradable. At least that's my experience.

    The web service seems like a solid plan to go for. I am just wondering if I reference the SiteFinity API into my webservice project, how it knows which database to use. Can I just add a connectionstring in the web.config to the sitefinity database?

    Thanks!
  4. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 Aug 2009
    Link to this post
    Hi Peter Meir,

    The web service should be running in the context of Sitefinity, otherwise you will not be able to use the Pages API.

    Once you get the page url address, you can create a webrequest, and take the response (which will contain the page rendered html). Then you can do whatever you want with the html - provide to another application or process it. 

    I hope this helps. 

    Kind regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
Register for webinar
4 posts, 1 answered