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 scheme, 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 schemes:
HTTP/HTTPS
TCP
IPC
Peer network
MSMQ
Service bus
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:
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:8002/MyService ...