svcutil 因服务故障而失败
我们有一个 WCF 自托管服务,我们已经开发了一段时间了。作为我们标准的一部分,我们定义了一个应用于操作的故障契约。
最近我们需要添加一个新的 ServiceContract,因此我们这样做了并向其添加了一个简单的方法(void/no params)。一旦我们添加了这个合约,SVCUtil 将不再为我们生成代理。相反,它会出错并说元数据包含无法解析的引用:“net.tcp://localhost/MyService”没有端点侦听等等。
我们最终调试到操作合约有故障合约。一旦我们将其删除,一切都会正常。这对我们来说非常奇怪,因为..
1) 新的服务合同与我们所有其他服务合同位于同一位置
2) the implementer of the service contract is the same as the implementer of all other service contracts (don't ask)3)FaultContract 与我们在其他地方使用的相同。
有什么想法可能导致这种奇怪的行为吗?
We have a WCF self hosted service which we have been developing for awhile. As part of our standard we have defined a FaultContract which we apply to operations.
Recently we needed to add a new ServiceContract so we did that and added a simple method (void/no params) to it. Once we added this contract though SVCUtil would no longer generate a proxy for us. Instead it would error out and say that the Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/MyService' There is no endpoint listening blah blah blah.
We finally debugged it to the fact that the operation contract has the faultcontract. As soon as we remove it everything works fine. This to us is very strange because..
1) the new service contract is in the same location as all our other service contracts
2) the implementer of the service contract is the same as the implementer of all other service contracts (don't ask)
3) The FaultContract is the same as the one we use everywhere else.
Any thoughts on what could be causing this weird behavior?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明不是FaultContracts的错。相反,使用 mex 的 netTcp 绑定会出现问题。当你达到一定数量的方法之后,它就不再起作用了。解决方案是切换到 http 绑定。
Turned out to not be FaultContracts fault. Instead there is a problem with using the netTcp binding for mex. After you reach a certain number of methods it just doesn't work anymore. Solution was to switch to an http binding.