Last week I had to deploy a service with multiple endpoints in IIS.
In this case my WCF service has 2 addresses, a base address and an endpoint address.
The base address is used for meta data. It matches to the SVC file we’ve created to host our service in IIS. So if a consumer uses our service. It will extract the WSDL metadata from this address. In your browser you will only be able to access the base address.
For example, http://localhost/IBuySpy/OrderService.svc
Inside your service,you can have an address for each endpoint. When you are actually calling the service, you will not be using the base address but one of endpoint address. Most of the time I configure my service so that for one address the base address and endpoint address are the same.
So when you are calling the service from a client app,you can use both addresses,
http://localhost/IBuySpy/OrderService.svc
http://localhost/IBuySpy/OrderService.svc/Endpoint2
The corresponding service configuration will look like this:
1: <system.serviceModel>
2: <services>
3: <service type="IBuySpy.OrderService">
4: <endpoint address="" binding="basicHttpBinding" contract="IBuySpy.IOrderService"/>
5: <endpoint address="Endpoint2" binding="wsHttpBinding" contract="IBuySpy.IOrderService"/>
6: </service>
7: </services>
8: </system.serviceModel>