Posts

Showing posts with the label WCF

Different ways to maintain WCF instance management

The WCF framework has provided three ways by which we can control WCF instance creation. Here will try to understand these ways of WCF service instance control and compare when to use them and under what situations. Normally WCF request and response consists of the following actions: 1.        WCF client makes a request to a WCF service object. 2.        WCF service object is instantiated. 3.       WCF service instance serves the request and sends the response to the client. There are different ways to instantiate WCF service object.  In a simple way, create a new WCF service instance whenever WCF client method calls. Only one WCF service instance should be created for each WCF client session. And third way is only one global WCF service instance should be created for all WCF clients.  WCF provides the ways to handle the above three ways:        ...

Basics of WCF

Image
Windows Communication Foundation (WCF) enables applications to communicate whether they are on the same computer, across the Internet, or on different application platforms. The basic tasks to perform are, in order: Define the service contract. A service contract specifies the signature of a service, the data it exchanges, and other contractually required data. Implement the contract. To implement a service contract, create a class that implements the contract and specify custom behaviors that the runtime should have. Configure the service by specifying endpoints and other behavior information. Host the service. Build a client application.  A service contract specifies the following: The operations a contract exposes. The signature of the operations in terms of messages exchanged. The data types of these messages. The location of the operations. The specific protocols and serialization formats th...