Objective

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

image

Where to use it?

image

How to choose between ServiceHost and WebServiceHost?

image

Example

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.

Advertisements

One thought on “WebServiceHost : Hosting a WCF REST Service

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 )

Google+ photo

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

Connecting to %s