Wednesday, October 27, 2010

Beginner - use WCF Service in Silverlight application

We will create a WCF service in the WEB project and use it in Silverlight application.

You can download the sample project.

Tools:
1. Visual Studio 2010 (Silverlight tools installed)
More info visit: http://www.silverlight.net/getstarted/

Create new project:


Project Structure:


Add WCF service to WEB project:




Write WCF service method:


Silverlight UI:


Add WCF Service reference into Silverlight project:

**Build WEB application before adding Service reference








Initiate and call WCF service method:





Sample Output:


Before Publishing:
















Download Source

3 comments:

  1. i couldn't get the value in wcf which i passed from silverlight

    ReplyDelete
  2. Hi Amyo,

    It's a good article for beginners like me.

    Thanks
    Pradeep

    ReplyDelete
  3. Thanks man, I think I see the light at the end of the tunnel. Simple and straight to the point.

    ReplyDelete