Search This Blog

Tuesday, January 7, 2014

Sample Applicaion in WCF

Windows Communication Foundation is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML or send as JSON. A few sample scenarios include:
  • A secure service to process business transactions.
  • A service that supplies current data to others, such as a traffic report or other monitoring service.
  • A chat service that allows two people to communicate or exchange data in real time.
  • A dashboard application that polls one or more services for data and presents it in a logical presentation.
  • Exposing a workflow implemented using Windows Workflow Foundation as a WCF service.
  • A Silverlight application to poll a service for the latest data feeds.
While creating such applications was possible prior to the existence of WCF, WCF makes the development of endpoints easier than ever. In summary, WCF is designed to manege Web services and Web service clients.


Steps to create WCF Service with IIS host in visual studio
  1. Open visual studio(run as administrator), click on file ->website
  2. Select Wcf service template. provide the name of service below, I created as http://localhost/FirstWcf then click ok.
  3. Visual studio will generate a solution in that solution you will get the service.svc file.
  4. in App_Code it will generate one Interface IService.cs and one class Service.cs which inherits IService.
  5. your services created press f5 to run the application.

No comments:

Post a Comment