EndpointDispatcher上带有Action ... ContractFilter不匹配的消息. [英] The message with Action ... ContractFilter mismatch at the EndpointDispatcher.

查看:71
本文介绍了EndpointDispatcher上带有Action ... ContractFilter不匹配的消息.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试在现有服务上执行所有其他方法正常运行的新方法时,出现以下错误.我没有接到我的服务的电话,因此不会产生任何内部错误,我可以捕捉到任何有关导致此错误的原因?:

I get the following error when attempting to execute a new method on an existing service where all other methods work without error.  I don't get a call to my service so no internal error is generated that I can catch, any ideas as to what is causing this?:

{System.ServiceModel.ActionNotSupportedException:由于EndpointDispatcher的ContractFilter不匹配,因此无法在接收方处理带有操作'DASvc/IScenarioDataService/ScenarioCloseService'的消息.这可能是由于合同不匹配(发送方和接收方之间的操作不匹配)或发送方和接收方之间的绑定/安全不匹配造成的.检查发送方和接收方是否具有相同的合同和相同的绑定(包括安全性要求,例如消息,传输,无).

{System.ServiceModel.ActionNotSupportedException: The message with Action 'DASvc/IScenarioDataService/ScenarioCloseService' 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).

服务器堆栈跟踪:
在System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(消息答复,MessageFault错误,字符串操作,MessageVersion版本,FaultConverter faultConverter) ProxyOperationRuntime操作,位于System.ServiceModel.Channels.ServiceChannel.Call(Proxy操作,布尔型单向,ProxyOperationRuntime操作,Object [] ins,Object []输出,TimeSpan超时)在System.ServiceModel处的ProxyRpc& rpc)
.Channels.ServiceChannel.Call(String action,Boolean oneway,ProxyOperationRuntime operation,Object [] ins,Object [] outs)
,位于System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall,ProxyOperationRuntime操作)
System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage消息)

Server stack trace:
   at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

在[0]处抛出异常:在System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)处
在System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,Int32类型) C:\ Dev \ DASVC \ DASvcClient \ ScenarioDataService.cs:line 2563中的.ScenarioCloseService().

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at DASvc.IScenarioDataServices.ScenarioCloseService()
   at DASvc.ScenarioDataServicesClient.ScenarioCloseService() in C:\Dev\DASVC\DASvcClient\DASvc.cs:line 4754
   at DASvc.ScenarioDataService.ScenarioCloseService() in C:\Dev\DASVC\DASvcClient\ScenarioDataService.cs:line 2563}

新方法的代码:

[ ServiceContract (Namespace = " DASvc" )]

[ServiceContract(Namespace = "DASvc")]

公共 界面 IScenarioDataService

public interface IScenarioDataService

{

[ FaultContract ( typeof ( dasvcErrorFault ))]//新方法签名定义

[FaultContract(typeof(dasvcErrorFault))] // New Method signature definition

[ OperationContract ]

[OperationContract]

布尔型 ScenarioCloseService();

bool ScenarioCloseService();

...}

[ 操作行为 ]

[OperationBehavior]

公共 布尔型 ScenarioCloseService()

public bool ScenarioCloseService()

{

尝试

try

{

返回 true ;

return true;

}

捕获 ( 例外 ex)

catch (Exception ex)

{

字符串 userName = Thread .CurrentPrincipal.Identity.Name;

string userName = Thread.CurrentPrincipal.Identity.Name;

dasvcErrorFault fe = errHandlerObj.HandleError(例如, " CloseService用户:" + userName,loggerObj, LoggingUtility . callEventID .EconomicScenarioDataService);

dasvcErrorFault fe = errHandlerObj.HandleError(ex, "CloseService User: " + userName, loggerObj, LoggingUtility.callEventID.EconomicScenarioDataService);

投掷 FaultException < dasvcErrorFault >(fe);

throw new FaultException<dasvcErrorFault>(fe);

}

}

推荐答案

就像您尝试使用为新服务实例创建的代理来调用服务的旧实例一样.

如果您100%确定要调用的服务已安装并正在运行新方法,则应该可以通过打开服务的跟踪来进一步诊断此问题.

If you are 100% sure that the service you are calling has the new method installed and running, then you should be able to diagnose this further by turning on tracing on the service.

希望这会有所帮助-

贾斯汀


这篇关于EndpointDispatcher上带有Action ... ContractFilter不匹配的消息.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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