Blog from Saravanan Arumugam

Let us talk about Technologies

Default end point of WCF service

Default properties of WCF service

Recently I tried to create a WCF service manually without using WCF service project template in Visual Studio 2010. I found a strange nature in the service which was different from my usual understanding.

I followed the following steps.

1. Created a web project.
2. Added two class files, one for Service Contract Interface and another for the service definition.
3. Created a service file (.svc) with the definitions pointing to the contract and namespace I have created.

The only thing I left alone was the configuration. I didn’t add any end point to expose my service out.

To my understanding, from the recommendation of any book or article I read, a service must expose an end point either through configuration or through the code.

I wanted to see the behavior of the service without specifying an endpoint explicitly to it.

I ran the service and found that it’s hosted usually as any web application hosted from file system.

On selecting the .svc link, I could get the WSDL link.

I then created a client application to consume the service and to see if its also behaving properly. I added a service reference and gave the address of the WSDL.

It worked flawlessly.


From this exercise I figured out the following.

1. An endpoint is not a mandatory thing for a WCF service.

2. When we create a consumer that adds service reference, the consumer project/application adds an endpoint in the configuration.

3. The end point in the consumer points to an address such as http://localhost:12345/TaskManagerService.svc.

4. The consumer calls the service through basicHTTPBinding. Hence basicHTTPBinding looks to be the default binding that Visual studio arrange for the developers.

5. The address of the WSDL port number and the address stays constant how many ever times we restart the applications. This behavior is due to the Developer Server arrangement by the Visual Studio.


2 responses to “Default end point of WCF service

  1. Pingback: Minimum Configuration Required for hosting a WCF service in IIS « Blog from Saravanan Arumugam

  2. Anthony February 19, 2013 at 1:26 pm

    In an effort to make the overall WCF experience just as easy as ASMX, WCF 4 comes with a new “default configuration” model that completely removes the need for any WCF configuration. If you don’t provide any WCF configuration for a particular service, the WCF 4 runtime automatically configures your service with some standard endpoints and default binding/behavior configurations. This makes it much easier to get a WCF service up and running, especially for those who aren’t familiar with the various WCF configuration options and are happy to accept the defaults, at least to get started.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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

%d bloggers like this: