1个wcf服务和2个客户端 [英] 1 wcf service and 2 client

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

问题描述

我有1个wcf服务,它有4个方法,我们有2个wcf客户端。现在我们想要

客户端1只获得方法1和2而客户端1只获得方法3和4.



我们可以通过采用2接口并为两个客户端创建单独的代理,但是当我们向客户端提供可以通过端点访问所有方法的终点时。

请帮助任何WCF专家。

I have 1 wcf service which have 4 method and we have 2 wcf client. Now we want
client 1 got only method 1 & 2 and client 1 got only method 3 & 4.

We can do this by took 2 interface and create individual proxy for both client but when we provide the end point to client that can be access all method through the endpoint.
Please help any WCF expert.

推荐答案

你可以实现多个端点提供给客户端



否则你可以使用MessageContract检查消息的标题

第二种选择的例子:

http:/ /dotnetmentors.com/tutorial-on-wcf-message-contract-by-example.aspx [ ^ ]
You could implement multiple endpoints to provide to client

Otherwise you could check the header of message using MessageContract
An example for second option:
http://dotnetmentors.com/tutorial-on-wcf-message-contract-by-example.aspx[^]


这篇关于1个wcf服务和2个客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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