jessenee 2013-11-29 08:10 采纳率: 0%
浏览 3272

wcf服务端如何处理多个Action为空的操作?

现有固定协议的webService,要开发一个相应的wcf服务,客户端是固定的,发送的SoapHeader中不包含Action信息,而服务端OperationContractAttribute中只能有一个Action="",如果OperationContract中不设置Action,则会报错
{"The message with Action '' cannot be processed at the

receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of

either a contract mismatch (mismatched Actions between sender and receiver) or a

binding/security mismatch between the sender and the receiver. Check that sender and receiver

have the same contract and the same binding (including security requirements, e.g. Message,

Transport, None)."}

如果设置其中一个Action=""再调用这个函数,能正常运行。
但这个Service中有多个函数,服务器端要如何定义才能识别空的Action?
在具体实现上加了[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)],没起作用

  • 写回答

1条回答

  • lanfan_11 2014-11-11 04:58
    关注

    同问,我也遇到这个问题了!不知道怎么解决。

    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图点聚合中Marker的位置无法实时更新
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题