生产服务器上偶尔出现错误:方法<名称>该代理不支持名称>
4 个生产服务器之一偶尔会生成大量错误声明:
此代理不支持方法 RunRules,如果该方法未使用 OperationContractAttribute 标记或接口类型未使用 ServiceContractAttribute 标记,则可能会发生这种情况。
“RunRules”方法是wcf [ServiceContract]接口中的方法之一,它被标记为[OperationContract]。
在这个错误之前,用同样的方法,偶尔会通过城堡容器得到错误的服务。在我输入更多日志信息来确定确切原因后,它转变为当前错误。
错误是由一个 Web 服务引起的,发生这种情况时它会尝试通过 WCF 端点调用 Windows 服务。而且这只发生在一台特定的机器上。频率大约是每周一次或两周一次。一旦发生 Web 服务回收(3 小时),错误就会停止。
对我来说,这几乎就像损坏的 vtable。只是想知道,您将如何解决这个问题?讨厌要求 IT 人员在没有确凿证据的情况下开始重新映像机器。
谢谢!
One of 4 production servers once in a while generates tons of error claiming:
Method RunRules is not supported on this proxy, this can happen if the method is not marked with OperationContractAttribute or if the interface type is not marked with ServiceContractAttribute.
The method "RunRules" is one of the methods in wcf [ServiceContract] interface, and it is marked as [OperationContract].
Before this error, in the same method, occasionally it would get a wrong service through castle container. After I put more logging information to nail down exact cause, it mutated into the current error.
It is a webservice the error comes out of, it tries to call into a windows service through wcf endpoint when this happens. And this only happens on one specific machine. The frequency is about once a week or 2 weeks. Once recycle of the webservice happens (3 hours), the error stops.
To me it is almost like corrupted vtable. Just wondering, how would you approach this problem? Hate to ask IT people start to re-image the machine without solid proof.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于这种抽象的魔法错误没有简单的答案,因此尝试记录整个调用堆栈,特别是内部
Castle
DLL 调用,如果标准异常不包含如此深层的调用堆栈信息 - 使用反射。然后使用 ILSpy 等实用程序反汇编 Castle DLL 并尝试分析哪种状态导致具体的执行流程,最终导致异常。
如果您能够记录调用堆栈 - 请分享,以便我也能够检查它。
No simple answer for such abstract magic error, so try out logging entire call stack, especially internal
Castle
DLL calls, if standart exception does not contain such deep call stack information - use reflection.Then using utility like ILSpy disassemble Castle DLL and try out analyze which state causes concrete execution flow which ends up with exception you got.
If you able log callstack - please share so I would be able check it as well.