1. Back To Blog

WCF interview questions and answers: - What is the difference between Service endpoint and Client endpoint?

This WCF interview question is making rounds in some .NET interview recently.

 

Endpoint in WCF service is the combination of three things address, binding and contract. Service endpoint is for the server, server where your WCF service is hosted. Service endpoint defines where the service is hosted, what are the bindings and the contract i.e. methods and interfaces.

 

While client endpoint is for the client. Client endpoint specifies which service to connect, where it's located etc.

 

 

Code of WCF Server end point looks something as shown below.

 


 

WCF Client end point code looks something as shown below.This is generated when you add service reference using add service reference.

 

 

Watch the below video on WCF interview question video: - Define WCF one way contract?.

 

Shiv Prasad Koirala

Visit us @ www.questpond.com or call us at 022-66752917... read more

We are on Social