How to add a web service reference based on a WCF service to the Kentico CMS solution

   —   
This article describes how to add a web service reference based on a WCF service to the Kentico solution. It deals with general configuration steps and the particular settings of web service reference, which are required for successful integration and use.
To add a web service reference within Kentico CMS solution, these steps must be followed:

1. Create sample WCF service and publish it on your IIS [1]
2. Launch Visual Studio as administrator
3. Right-click on CMSApp --> Add Service Reference
            a. Enter address to WCF service
            b. Go (web service found)
            c. Select namespace
            d. Ok (wait for service reference to be added – it may take several minutes)

Go to "Configure Service Reference…" dialog and setup it as per the following screenshots:







5. Rebuild solution.
5. Create sample Kentico web part [2]
6. Reference service in the sample web part’s code-behind.
-rm-


See also:
[1] WCF Service Publishing
[2] Developing custom web part


Applies to: Kentico CMS 7.x
Share this article on   LinkedIn