WCF from theory to practice: WCF solution templates

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.