WebServiceHost : Hosting a WCF REST Service


In this article, I will explain

1. What is WebServiceHost Factory class?

2. What is its function?

3. Where to use it?

4. One sample on hosting WCF REST Service using WebServiceHost.

What is WebServiceHost factory?

1. This is useful to host WCF REST End points.

2. This is derived from ServiceHost.

3. WebServiceHost has some extra functionality.

4. WebServiceHost works exactly the same way ServiceHost works.

WebServiceHost factory perform following special task


Where to use it?


How to choose between ServiceHost and WebServiceHost?



In this example, I will show you step by step, how we can create a REST Service and host it in a console application using WebServiceHost factory.

To see the complete step by step walkthrough , follow my below article.

Hosting WCF REST Service in Console Application.

I hope this post was useful. Thanks for reading. Happy coding.

One response to “WebServiceHost : Hosting a WCF REST Service”

  1. thanks Dhananjay….very Useful to me

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a website or blog at WordPress.com