客户端仍旧无法使用事务提示“与基础事务管理器的通信失败”
用TransactionScope进行事务
using (TransactionScope ts_scope = new TransactionScope())
{
try
{
this.stockBindingSource.EndEdit();
stockTableAdapter.Update(shunfeng_csDataSet);
this.custominfoBindingSource.EndEdit();
custominfoTableAdapter.Update(shunfeng_csDataSet);
this.sellinfoBindingSource.EndEdit();
sellinfoTableAdapter.Update(shunfeng_csDataSet);
ts_scope.Complete();//完成提交
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
return;
}
finally
{
ts_scope.Dispose();//释放资源
}
在本机上运行正常,但在客户端运行始终提示“与基础事务管理器的通信失败”,我已启动Distributed Transaction Coordinator服务,在控制面板---管理工具---组件服务---计算机---我的电脑属性中也设置了安全配置,防火墙中也加上了MSDTC例外,但客户端仍旧无法使用事务。查看网上资料有的说要开启135端口,但始终无法打开,现在客户端仍旧无法使用事务,这是怎么回事?