To add a web service reference within Kentico CMS solution, these steps must be followed:
- Create sample WCF service and publish it on your IIS [1]
- Launch Visual Studio as administrator
-
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:
![Image1](/getattachment/2da9a5e8-f83d-48b4-8f8a-db4191d8252a/01_Configure.png)
![Image2](/getattachment/3e4968d5-593d-42fb-9265-b7d0cf1ca837/02_Reuse_Assemblies.png)
![Image3](/getattachment/6e55ac16-6c31-408f-b36c-7608de40d5ed/03_Disabled_Assemblies.png)
-
Rebuild solution.
-
Create sample Kentico web part [2]
-
Reference service in the sample web part’s code-behind.