.net

Advantages and Disadvantages of hosting WCF service in iis (Part-22)

Posted on

Advantages of Hosting WCF service in iis: No custom code is required to host the service The servicehost directive in .svc file is responsible for creating an instance of Service host when required, so no need to write custom code for hosting Automatic message based activation We need not start/stop the service manually.iis provides message […]

.net

Hosting WCF service in iis(Part-21)

Posted on

To Host a WCF service in iis,we will make use of same WCFSelfHostService webservice that we have created. To host WCF service in iis: Right click on solution–>Add–>new website–>WCF service–>Save it in same folder where we have WCFSelfHostService and name it WCFIISHost. Delete cs files from appcode folder because we wanted to host existing service Add […]

.net

Advantages and Disadvanatages of hosting WCF service in windows service(Part-20)

Posted on

Advantages of hosting WCF service in windows service: Windows service runs in background and can start Automatically In case of failure,Windows service can be configured to restart automatically Windows service supports all binding and transport protocol The WCF service that the windows service hosts starts automatically or you can manually start or stop the service […]

.net

Hosting a WCF service in Windows service(Part – 19)

Posted on

This is in continuation to part 17. Self Hosting WCF service Let’s create a Windows service and add it to WCFSelfHostService solution. Right click on solution–>add–>New Project–>Rename it to WindowsServiceHost. Add reference to WCFSelfHostService Add reference to System.ServiceModel Add new configuration file to WindowsServiceHost–>Right click on WindowsServiceHost–>Add app configuration file We will copy the configuration […]

.net

Hosting WCF Service(Part-16)

Posted on

For a WCF service to available for the client to consume, we need to host the WCF service. There are multiple ways to host the service. Self-hosting WCF service can be self hosted using console application Windows Service Internet Information Service(IIS) Hosting within IIS supports HTTP binding Windows Activation Service(WAS) Hosting WCF service with WAS […]

.net

Configure WCF Service Endpoint dynamically(Part-15)

Posted on

We can configure WCF service endpoint in 2 ways. Declare in configuration file Dynamically in code Declare in configuration file You can declare the endpoints declaratively in WCF service. we will take example of Hello Service.In app.config, you will see the end point.

Also you will have a service behavior where you will be […]

.net

Binding in WCF(Part-14)

Posted on

A WCF binding defines how the client needs to communicate with the service. Let’s understand WCF service end points before understanding Binding. A WCF service endpoint consists 3 things. A – Address : Address for the WCF service B – Binding : How the Client needs to communicate with the service C – Contract : […]