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 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料