开发者

What is the base address of a netTcpBinding in WCF?

In the "Default NetTcpBinding" section on WCF on MSDN is the following example.

<endpoint address=""
      binding="netTcpBinding"
      contract="Microsoft.ServiceModel.Samples.ICalcu开发者_如何学Clator" />

There seems to be no information on what the effective address is if set to null.

Elsewhere I received advice to set it to:

net.tcp://localhost:8000/myservice

But if I do that how to I ensure myservice is visible to localhost:8000?

Lastly, is it possible to learn WCF from MSDN alone?


Personally, I rarely use baseAddresses as I don't work with relative Urls; I'm lazy and prefer to set them to "".

By default if not set, the host will provide an address. If the the host fails to provide an address, loading the service will fail with an exception.

IIS for instance, will provide a base address of localhost or mydomain.com.

The TCP default port is 808.

You should expect an address of net.tcp://localhost/myservice on port 808 by default, on port 8000 if specified.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜