WCF:如何传输已知类型的信息? [英] WCF: how to transfer known types information?

查看:56
本文介绍了WCF:如何传输已知类型的信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个WCF服务(我们称之为主服务).该服务的多个实例可以在网络中的不同计算机上工作.我还有另一个WCF服务(负载平衡器),该服务在主要服务的实例之间执行负载平衡.

I have a WCF service (let's call it main service). Multiple instances of this service can work on different computers in a network. I have another WCF service (load balancer) which performs load balancing between main service's instances.

所有客户端的请求都到达负载均衡器,并被重定向到主服务的实例.负载平衡器的接口模仿主服务的接口.但是,主要服务也将可序列化类型的动态列表公开为已知类型.这些类型对于负载均衡器可见,但我也需要使其对客户端可见.因此,我需要将它们添加为负载均衡器的已知类型.

All clients' requests come to load balancer and are redirected to main service's instances. Load balancer's interface mimics the interface of the main service. But main service(s) also expose dynamic list of serializable types as Known types. These types are visible for load balancer but I need to make them visible for it's clients too. So I need to add them as load balancer's known types.

正如我所说,类型列表是动态的,我事先不知道这些类型.

As I said, the list of types is dynamic, I don't know these types in advance.

看起来我需要获取主服务的元数据的一部分,并将其添加到负载均衡器的元数据中.有什么解决办法吗?

It looks like I need to take a part of main service's metadata and add it to load balancer's metadata. Is there any solution for this?

谢谢

Artem

推荐答案

我想您会在论坛,

此致


这篇关于WCF:如何传输已知类型的信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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