开发者

Multiple WCF Services (self hosted)

I have a set of WCF Services which are hosted from within a Windows Service.

I need to run multiple instances - which is fine, I can do that using unique endpoints, however for a given instance I need to known which instance it is.

For example I might have end points:

net.tcp://localhost:9000/Customer1/MyServerFunctions

net.tcp://localhost:900开发者_StackOverflow1/Customer2/MyServerFunctions

When a the WCF Service is called I need to know whether it is for Customer1 or Customer2

Suggestions?


Your service implementation can call

OperationContext.Current.Channel.LocalAddress

to determine which customer endpoint the request came from.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜