WCF (hosting service in IIS) - machine name automattically being picked up by WCF rather than IP?

后端 未结 1 2047
温柔的废话
温柔的废话 2021-01-26 15:16

So, I previously posted about my troubles in moving a working WCF service from my local machine to the development server. The problem was that when moving it over all of the r

1条回答
  •  不知归路
    2021-01-26 15:42

    The right way to handle this is to set and explicit host-header in IIS for the Web Site instance. Now, assuming you've only got one host-header applied to the Web Site instance that should be all that you need. However, if you have multiple host-headers configured you will also need to explicitly tell WCF which host to expose itself via. This is done with the configuration element under the element to bind the service to that specific domain.

    0 讨论(0)
提交回复
热议问题