hiddenUser
hiddenUser

Reputation: 692

WCF Application EndPoint

I quote from the MSDN:

application endpoint
An endpoint exposed by the application and that corresponds to a service contract implemented by the application.

Can somebody please explain this definition for me? Is the application endpoint the same as the service reference created by the Visual Studio?

Upvotes: 4

Views: 274

Answers (2)

Cybermaxs
Cybermaxs

Reputation: 24558

All communication WCF service occurs through the endpoints. It provide clients access to the functionality offered by a WCF service.

Each endpoint consists of three properties:

  • Address (Where)
  • Binding (How)
  • Contract (What)

Endpoints can also have a set of behaviors that specify local implementation details. endpoints concept exists both on clients and services : A WCF services can expose multiple endpoints and a client may communicate with services with multiple endpoints.

Can somebody please explain this definition for me? Is the application endpoint the same as the service reference created by the Visual Studio?

When you add a service reference, Visual Studio will add a new client endpoint in your application (check updated config file). However, Visual Studio will try first to download metadata in order to list all available endpoints for an address.

Upvotes: 2

Scott Chamberlain
Scott Chamberlain

Reputation: 127563

Basic Explanation:
The application endpoint is the address that your clients will connect to to get to an instance of a service that implements the listed "service contract".

Further Explination:
WCF works through Interfaces, not classes. Each one of those Interfaces is known as a "Service Contract". A single class could implement more than one Interface so two service contracts could be hosted by a single class. You did not ask about this, but I thought I should get that out there too.

To answer your question, a single Interface can be connected to in multiple ways. Each of those ways you create are called Application Endpoints. Here is a practical example: You may want people to be able to connect using either HTTP for external connections or named pipes for requests generated on the same machine for higher performace. By setting up two endpoints up for a single "Service Contract" that lets you have that flexibility.

Upvotes: 0

Related Questions