WCF - WINDOWS COMMUNICATION FOUNDATION
how wcf works?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sanwar RanwaPosted Nov 7, 2018, 5:50 AM
How does WCF service work?
1. A WCF Service is an object that exposes a set of operations that client application can invoke. So while developing the WCF service you can describe the operations by using a service contract and then create a class that implements the contract.
2. To execute the service, one has to provide a runtime environment for the object and than make the object available to client application. This runtime environment for an object implementing the service is provided by a ‘HOST’ application.
3. Following are the tasks that a HOST application has to perform.
a. Starting & stopping the service.
b. Listening for requests from a client application & directing them to service.
c. Sending any response from the service back to the client application.
Service Endpoint (ABC)
1. Address – the address depends on several factors including the transport protocol being used. For example ‘http”//localhost/ProductsService.ProductsService.svc’ specifies the virtual directory and the service definition file. If one happens to build its own custom host application, then one can use a different transport mechanism & one must specify an address that is appropriate to one’s chosen transport mechanism.
2. Binding – specifies how a client can connect to the service and the format of the data expected by the service. A binding can include the following.
a. Transport protocol
b. Encoding format of message.
c. Security requirement of the service.
d. Transactional requirement of the service.
e. Reliability of communication.
3. Contract – is an interface stored in the .NET framework assembly and an-noted with [ServiceContract] attribute. The service contract describes the operations implemented by the service by tagging them with [OperationContract] attribute.
For more details please check these Linksrahul yadavPosted Nov 7, 2018, 3:21 AM
Laxmidhar SahooPosted Dec 1, 2017, 7:31 AM