WCF programming model support 3 styles of programming :
- Declarative programming, in which we can define attributes
- Imperative programming, in which we work with the WCF object model in code
- Configuration-based programming, in which we define behavior in application configuration files
Service programs: In it defines four element
- Contract definitions: A servicehave at least one service contract, and it might contain multiple service contracts, data contracts, or message contracts.
- Implementation code: The service contracts in a service need code to implement their service operations.
- Hosting code: Some code is needed to create and start the service.
- Endpoint definitions: One or more address "binding" contract endpoints must be declared.
Before Starting :
This example require the following packages to be installed on your system.
- .net framework 3.0 RC1
- Windows SDK RC1
There are three service for WCP service.
A. Developing the Server application
- Step 1: Create the application
- Step 2: Create the Service Contracts
- Step 3: Create the Service Implementation Code
- Step 4: Create the Service Host
- Step 5: Create the Service Configurations
B. Publish the Service MetaData
C. Create .net Based Client Application