Silverlight客户端中使用的WCF自定义行为问题

时间:2010-10-28 12:37:24

标签: wcf silverlight-4.0

要将文化信息从客户端传递到WCF服务,我已使用自定义检查器创建了自定义行为。检查器类实现IDispatchMessageInspectorIClientMessageInspector

我的客户是Silverlight应用程序。现在我遇到IDispatchMessageInspector的问题,因为System.ServiceModel.Dispatcher.dll中不可用的问题无法作为Silverlight 4项目的程序集引用添加。

有人可以帮帮我吗?如何处理将消息从SILVERLIGHT发送到wcf的自定义行为。 ?

1 个答案:

答案 0 :(得分:1)

IClientMessageInspector需要在客户端实现和使用(本例中为silverlight),而IDispatchMessageInspector需要在服务端使用。

以下帖子非常有帮助:

Automatic Culture Flowing with WCF by using Custom Behaviour

Automate passing valuable information in WCF headers

Processing custom WCF header values at server-side