Skip to Content
Programming WCF Services, 2nd Edition
book

Programming WCF Services, 2nd Edition

by Juval Lowy
November 2008
Intermediate to advanced
784 pages
23h 28m
English
O'Reilly Media, Inc.
Content preview from Programming WCF Services, 2nd Edition

Addresses

In WCF, every service is associated with a unique address. The address provides two important elements: the location of the service, and the transport protocol, or transport schema, used to communicate with the service. The location portion of the address indicates the name of the target machine, site, or network; a communication port, pipe, or queue; and an optional specific path, or URI (Universal Resource Identifier). A URI can be any unique string, such as the service name or a globally unique identifier (GUID).

WCF supports the following transport schemas:

  • HTTP

  • TCP

  • Peer network

  • IPC (Inter-Process Communication)

  • MSMQ

Addresses always have the following format:

[base address]/[optional URI]

The base address is always in this format:

[transport]://[machine or domain][:optional port]

Here are a few sample addresses:

http://localhost:8001
http://localhost:8001/MyService
net.tcp://localhost:8002/MyService
net.pipe://localhost/MyPipe
net.msmq://localhost/private/MyQueue
net.msmq://localhost/MyQueue

The way to read an address such as this:

http://localhost:8001

is like this: "Using HTTP, go to the machine called localhost, where on port 8001 someone is waiting for my calls."

If there is also a URI, as in:

http://localhost:8001/MyService

the address will read as follows: "Using HTTP, go to the machine called localhost, where on port 8001 someone called MyService is waiting for my calls."

TCP Addresses

TCP addresses use net.tcp for transport and typically include a port number, as in:

net.tcp://localhost ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming WCF Services

Programming WCF Services

Juval Lowy

Publisher Resources

ISBN: 9780596157210Supplemental ContentErrata