ASPX templates
Version 4.x > ASPX templates > API use sample View modes: 
User avatar
Member
Member
srizzetto-microgate - 8/17/2009 2:55:43 AM
   
API use sample
I would like to use your API outside the webproject (eg in a WPF application or in a WCF service).

Do you have a sample:
1) what reference to Add and what to include in web.config
2) A sample that retrieve all documents of a language, of type News under a node ("/News/%")

Thanks
Sandro

User avatar
Kentico Developer
Kentico Developer
kentico_helenag - 8/17/2009 9:51:43 AM
   
RE:API use sample
Hello Sandro,

1. Please see here: http://www.kentico.com/docs/devguide/using_api_and_cms_controls_outside_cms_project.htm for more information about API using outside the CMS project.

2. You may see the sample here: http://www.kentico.com/docs/devguide/selecting_nodes.htm (Select multiple documents sample on the bottom)

Best regards,
Helena Grulichova

User avatar
Member
Member
tony.j.clark-gmail - 1/11/2013 11:44:53 AM
   
RE:API use sample
I have checked the documentation and I see references to web based projects only. Is it possible to use the API in a WPF application. I have tried to configure the connection string in the app.config file of a WPF application with no success. The internal exception reads "The ConnectionString property has not been initialized". Can this property be set dynamically?

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/17/2013 4:15:22 AM
   
RE:API use sample
Hi,

What is the stack trace of the error you are getting?

also, you can initialize the connection string dynamically too - using the SQLHelper class and its methods.

Best regards,
Juraj Ondrus