You are on page 1of 18

Understanding Metadata

Host
Take Home
• A ServiceHost is not tied to any particular
application domain. This means that unlike ASMX
files, which always reside at an IIS virtual
directory (for example,
http://computer/vDirectory), ServiceHost when
opened does not know where it is. It must
therefore be passed (or infer from absolute
addressing) a “base” or “root” address to which
all relative addresses used by the host are
appended.

• When a Service.svc file is hosted in IIS/WAS, the


ServiceHost acquires the base address from
IIS/WAS, and is therefore automatically whatever
the virtual directory is, just like ASMX, plus the
“Service.svc” relative address that points to the
Take Home
• A ServiceHost is not tied to any particular
application domain. This means that unlike ASMX
files, which always reside at an IIS virtual
directory (for example,
http://computer/vDirectory), ServiceHost when
opened does not know where it is. It must
therefore be passed (or infer from absolute
addressing) a “base” or “root” address to which
all relative addresses used by the host are
appended.

• When a Service.svc file is hosted in IIS/WAS, the


ServiceHost acquires the base address from
IIS/WAS, and is therefore automatically whatever
the virtual directory is, just like ASMX, plus the
“Service.svc” relative address that points to the
Base Address

Absolute Address
Endpoint Address
Endpoint Address

The client can access the service via the endpoint address
such as the following:

• http://mymachine:8080/myservice/

Once the client has accessed the service via the endpoint
address, the client can talk to the service, and all
communication to and from the service goes through this
endpoint at this address.
Base Address
Base Address
• The base address is associated to the service, allowing you
to assign relative addresses to the individual endpoints.

You can assign a given service the following primary, or base,


address:
• http://mymachine:8080/myservice/

With the base address assigned to the service, you can then
assign the three endpoints the following relative addresses:
• http://mymachine:8080/myservice/service1
• http://mymachine:8080/myservice/service2
• http://mymachine:8080/myservice/service3
MEX Address

• MEX addresses allow a client to gather information about a


particular service. MEX, meaning metadata exchange, is an
HTTP endpoint address used to obtain service information.
The end

You might also like