Tip 1 : WCF Service Deployment: Leave IIS-Hosted Service Endpoint Address Blank
In client configuration, it is required to specify an absolute address of endpoint. However, in IIS-hosted service configuration, it is required to specify a relative address. IIS manages the ServiceHost instance, which provides base address for service.
For example, given a service URL http://www.stanleygu.com/Demo.svc
In client configuration, use the absolute address:
<client><endpoint address="http://www.stanleygu.com/Demo.svc" binding = "customBinding"
In IIS-hosted service configuration, use the relative address.
<service behaviorConfiguration="StanleyGu.DemoBehavior" name="StanleyGu.Demo"><endpoint address="" binding="customBinding"