in Projects, WCF

How do you structure your WCF projects?

WCF projects do not always tend to stay in one project solution. As the business requirement grows, we see that we might need to break up our WCF solution into various bits. Here is a way I handle my WCF projects.

I break up my WCF project into the following bits (each being a class library in Visual Studio):

  • DataContracts
  • MessageContracts
  • FaultContracts
  • ServiceContracts
  • ServiceImplementation
  • ServiceHost

The ServiceHost project can be a self hosted application or a WCF Service Application hosted in IIS. This can change according to your business requirements. This breakup helps me to handle each of the component more efficiently.


There is still one thing that we need to address here – How do we plan to handle Service Errors(and possibly return them back to the Client)? Again, there are many ways to accomplish this, but best is to go with your business needs.I will be writing more about this soon.

I am very much interested to know how you handle your WCF projects and the structure you use for WCF projects. Feel free to share your thoughts

Write a Comment


Time limit is exhausted. Please reload the CAPTCHA.