具有2个服务合同的WCF服务 [英] WCF service with 2 service contracts

查看:68
本文介绍了具有2个服务合同的WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道这是否可能.

我有一个现有的WCF服务,可供8个客户端使用.我有一个新的要求,要为2个客户公开一个新操作,但不希望其他6个客户知道这一点.因此,如果我将此新操作添加到现有ServiceContract中,则所有客户端都必须更新其引用.

这是否可能使我制定了一个新的服务合同,其中包含了现有服务合同的所有操作以及新操作,并且希望此操作的2个客户端可以使用新的ServiceContract,而其他6个客户端则继续使用现有的服务合同.

I wonder if this is possible.

I have a existing WCF service, being consumed by 8 clients. I have a new requirement of a new operation to be exposed for 2 clients, but don''t want that the other 6 clients should be made aware of it. So if I add this new Operation to existing ServiceContract all the clients will have to update their reference.

Is this possible I make a new service contract which has all the Operations of the existing one plus the new operation, and the 2 client who want this operation can use new ServiceContract and other 6 clients keep using the existing service contract.

推荐答案

我原本以为有点pre可危.为什么没有两个不同的端点?或使用某种权利系统,以便即使经过授权的客户也可以拨打电话,即使他们知道这一点.
A bit precarious I would have thought. Why not have two distinct endpoints? Or use some sort of entitlements system so only authorised clients can make the call, even if they know about it.


这篇关于具有2个服务合同的WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆