简体   繁体   中英

Client to WCF Service with ancestor interface

I am making a WCF service that will expose an interface IC that inherits from two other interfaces, IA and IB.

Will WCF allow me to open a client proxy to that service using only IA or IB (thus exposing only part of the service interface to it), and if so are there any settings that I have to change for this to work?

If you do "add service reference" in the client side then all inheritance is lost and you will only see one flat interface. The reason is that the WSDL file does not support it.

If your client and server share the same assembly (.net only) you may do something like this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM