Multiple interfaces from a single WCF service?

前端 未结 5 2080
情书的邮戳
情书的邮戳 2020-12-05 02:44

Can a single WCF service offer multiple interfaces, and if so how would you express this in app.config?

I mean one services offering several Interfaces

5条回答
  •  醉酒成梦
    2020-12-05 03:08

    The following looks closer to the original goal and doesn't involve one large interface...

    Multiple Endpoints at a Single ListenUri: http://msdn.microsoft.com/en-us/library/aa395210.aspx


    The sample linked to above explains that it's possible to have multiple endpoints registered at the same physical address (listenUri), each implementing a different interface (contract), e.g.:

    
    
    
    

    This is possible because incoming messages are routed to the appropriate endpoint based on a combination of address and contract filters.

提交回复
热议问题