More in this section

Forums / Developing with Sitefinity / developing winform app to interact with CMS

developing winform app to interact with CMS

10 posts, 0 answered
  1. Nick
    Nick avatar
    91 posts
    Registered:
    04 Aug 2008
    21 Nov 2008
    Link to this post
    hey all, it's been a while since i've asked for help round these parts, but once again i need some advice/expertise :-)

    basically, i would like to know if it's possible to build a WinForm application that is capable of interacting, making calls to and receiving information via the CMS API? Obviously the API alone would not be enough to enable this (it wouldn't know where to retrieve information from!). So would a  combination of the API and the web.config enough to begin creating such an application with this functionality?

    any comments, ideas, thoughts will be much appreciated.

    thanks!
    Nick
  2. SelAromDotNet
    SelAromDotNet avatar
    912 posts
    Registered:
    18 Jul 2012
    21 Nov 2008
    Link to this post
    i don't know too much about this but doesn't the sitefinity license prevent use of the api outside of a sitefinity website? I know there is the metablog api for using stuff like live writer for blogs, but that might some kind of exception since it's an external standard (I think?)...
  3. Joel
    Joel avatar
    29 posts
    Registered:
    13 Feb 2008
    21 Nov 2008
    Link to this post
    I can't speak for Sitefinity, but I would be surprised if they told you "no you can't" if you wanted to build a custom web service interface into the data model. From a previous conversation, Sitefinity has informed me that they, in the future, may extend the API over web services. I have read multiple times Sitefinity advise not to build directly against the data model ~ consider this a sample, not something to use, only something to review as a possibility:

    http://www.konecny.com/SQL2008_552350_konecnyServices.asmx

    This was generated using Codesmith directly against the database (BAD... Sitefinity will suggest not doing this). A much more elegant way would be to build a custom web service using the Sitefinity API directly, so permissions and content is channeled through its systems correctly.

    Nonetheless, here is the source, just as a sample of how it might work, it is opperational, you just need to modify the connection string and add the web.config settings to your current web.config:

    http://www.konecny.com/webservices.zip

    A good web service would be the perfect way to integrate a Windows application into Sitefinity (This is not that good web service, only an idea). I've disabled the actual functionality of the web service on my site to keep my database protected :).


  4. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    21 Nov 2008
    Link to this post
    Hi,

    I have posted other question about this. I agree that the object is not expose the direct Db to external services using the Joel solution, but we need some samples to build custom services from sitefinity and exposing contents to external machines or others Sitefinity web sites using API and "full secured" in/out way.
    You can use this solution as starting point, but you need to secure.

    http://blog.madskristensen.dk/post.aspx?id=1fd22a49-cdb5-49ec-88ec-dd7599bfb7c3

    May be sf team could help us more with api class and securing this way?

    Regards 
  5. Nick
    Nick avatar
    91 posts
    Registered:
    04 Aug 2008
    24 Nov 2008
    Link to this post
    thanks for the replies guys, some helpful suggestions!

    i didn't originally think of exposing it as a web service, but that's definitely a good architecture to adopt if it was to be done.

    i don't think security would be a massive issue as we would most likely only expose it internally for limited use by a small handful of people, but of course, it's always a consideration.

    and yes i didn't plan to access the DB directly as it's all black box technology not to be tampered with by the outside world. i would definitely route everything through the sitefinity API.

    hopefully one of the telerik guys will get back about this soon enough, and provide some useful advice (and hopefully not to say it's not permitted under the end user agreement or something!)




  6. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    24 Nov 2008
    Link to this post
    Hello,

    There is no way to do this from WinForms application - even if you reference the assemblies somehow, they are tied with the configurations in web.config file. How will you load this configuration? It can be only loaded by a web application (that is why it is called web.config) and not from application (the application config files are named app.config). The best way to do it is with web services, something which we already consider to do :) Then you should only develop a WinForms web services client.

    As for the security of these services, we will consider how to implement this. It should be an option you can set through the UI though.

    Regards,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Nick
    Nick avatar
    91 posts
    Registered:
    04 Aug 2008
    24 Nov 2008
    Link to this post
    that's what i suspected, so obviously i'll be going with web services if/when i get this up and running!

    is this possible to do presently in sitefinity? i am not currently using v3.5, would it be possible in v3.2 SP2? if so, how would i go about it?

    as for security, these services would not be exposed to the outside world so it is not a massive problem/consideration
  8. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 Nov 2008
    Link to this post
    Hi Nick,

    All you need for your services is to use the Sitefinity APIs. Having that said, you should follow the same approach for Sitefinity 3.2 and Sitefinity 3.5. Here's a nice tutorial on web services.

    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  9. Nick
    Nick avatar
    91 posts
    Registered:
    04 Aug 2008
    26 Nov 2008
    Link to this post
    ok thats awesome, i'll let you know how i get on with this in future.

    would doing this necessitate opening the sitefinity installation as a project/solution in visual studio or could i just "drop" the web services in?
  10. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    26 Nov 2008
    Link to this post
    Hello Nick,

    The best way is to open the entire Sitefinity project in visual studio. This way you would be able to track everything you need, and to debug your solution.
     
    Best wishes,
    Georgi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Register for webinar
10 posts, 0 answered