Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

WCF Service Application Documentation 2012

DZone's Guide to

WCF Service Application Documentation 2012

· Web Dev Zone
Free Resource

Learn how to build modern digital experience apps with Crafter CMS. Download this eBook now. Brought to you in partnership with Crafter Software

   •   Purpose
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. 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 as complex as a stream of binary data.

   •   Scope
This document covers technical details for creating Windows Communication Foundation (WCF) service application.

2: Steps for Creating WCF Service

2.1 Create WCF Service Application
   •   Open visual studio 2008(and above) and select new->Project->Visual C# -> WCF Service Application. 


Give service name and click OK
   •   It will create one class i.e.  ServiceName.svc.cs  and interface i.e. Iservice.cs
   •   Add the method and logic as per user requirements within a class ServiceName.svc.cs 

2.2 Browse Service to get Service address

   •   Run or browse the Service Application to get the service address. It will appear following screen
   •   Click on service (here service name is transaction.svc) to get the service address.

2.3 Add service reference in web app

   •   Right Click on web application and select Add Service Reference


   •   Add service reference in address field and click OK
   •   Now you can use WCF service in your application.

3.  WCF Service Details:

3.1 WCF Service working:

In WCF service, user sends request through application and WCF service process that request and send response back to user application. Above figure shows WCF Service working.

WCF services are hosted using 3 different ways. They can be hosted in IIS or self-hosted or in services. WCF services are platform independent so they can be used in any programming languages. WCF services are easy to implement and access than soap services.

This article was written by the Imaginovation team.  They are a Raleigh web design and software development company who uses .NET, PHP, HTML5, JavaScript, and jQuery technologies.

Crafter is a modern CMS platform for building modern websites and content-rich digital experiences. Download this eBook now. Brought to you in partnership with Crafter Software.

Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}