The so-called Maito, although VS2008 provides us with the Wcfservicelibrary project template, but in the actual development, we usually prefer to set up the WCF project in their own way, usually, we will service contract (usually interface) data contract, A contract, such as a message contract, is a project, and the implementation of the service as a separate project, in addition to a WCF service hosting program, Service agent project, client program. I made a generic template for a WCF solution in this way. The project list is as follows:
Project name |
Description |
Wcf.contracts |
Contract project, used to define service contracts, data contracts, error contracts, message contracts, etc. |
Wcf.servicelib |
Service Implementation Project |
Wcf.host |
Host of a service for the console |
Wcf.webservicehost |
An IIS Host |
Wcf.proxys |
Service Agent Project |
Wcf.client |
Client Project |
In the console host, there are three kinds of managed methods
NetTcpBinding Suitable for LAN
BasicHttpBinding similar to XML Web service
Wsdualhttpbinding similar to WSE and with callback support
It also specifies that the starter project for the solution is wcf.host and wcf.client for multiple startup projects, which is more conducive to the debugging of WCF projects.
Operation Effect:
This article supporting source code