可以对Endpoint中binding参数进行设置。每种绑定类型可拥有多个名称(name)不同的参数设置,然后在Endpoint的bindingConfiguration 属性中指定关联设置名称即可。
<system.serviceModel>
<services>
<service name = "MyService">
<endpoint
address = "net.tcp://localhost:8000/MyService/"
bindingConfiguration = "TransactionalTCP"
binding = "netTcpBinding"
contract = "IMyContract"
/>
</service>
</services>
<bindings>
<netTcpBinding>
<binding name = "TransactionalTCP"
transactionFlow = "true"
/>
</netTcpBinding>
</bindings>
</system.serviceModel>
配置WCF服务交易流
本文介绍如何在WCF服务中配置交易流属性以确保消息处理的原子性。通过示例展示如何设置Endpoint的bindingConfiguration来启用事务支持,并在binding中具体定义事务流属性。
1万+

被折叠的 条评论
为什么被折叠?



