【问题标题】:TransactionAutoComplete set to false cannot be used with operations on callback contractsTransactionAutoComplete 设置为 false 不能与回调合约的操作一起使用
【发布时间】:2014-08-22 15:18:32
【问题描述】:

尝试连接到旧版 NetTCP 绑定时,普通的 HTTP WCF 服务会引发此错误。我希望能够将交易流向服务并启用它。我没有使用双工合同,为什么它甚至在错误消息中提到“回调”合同?

如果您需要查看更多代码,请直接说,但我现在会接受任何建议!

** 执行 ChannelFactory.CreateChannel() 时抛出错误

The operation 'XService' on callback contract 'IXService' is configured with TransactionAutoComplete set to false. TransactionAutoComplete set to false cannot be used with operations on callback contracts.

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.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

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 IXService.Add(Int32 id, Int32 createdById, String note, Int32 productTypeId, Int32 noteTypeId)
   at XService.Add(Int32 id, Int32 createdById, String note, Int32 productTypeId, Int32 noteTypeId)

【问题讨论】:

  • 我重写了很多代码,现在可以正常工作了。不幸的是,我不知道是什么解决了它...

标签: c# web-services wcf nettcpbinding net-tcp


【解决方案1】:

我遇到了同样的问题。 我一直在以编程方式启动服务以及配置(基地址、绑定、端点……)。

我最终将所有配置导出到配置文件,并且成功了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-07-10
    • 1970-01-01
    • 2013-04-23
    • 2013-04-22
    • 2017-05-13
    • 1970-01-01
    • 2016-03-09
    相关资源
    最近更新 更多