完成事务后无法查询LDAP [英] Fail to query LDAP after completing transaction

查看:91
本文介绍了完成事务后无法查询LDAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在.Net framework 4,SQC 2008 R2数据库中删除了一个网站。我使用系统事务处理事务和企业库数据进行所有数据库访问,所有数据库访问都是通过存储过程完成的。

I am deleloping a web site in .Net framework 4, SQC 2008 R2 database. I am using System Transaction for transaction and Enterprise Library data for all Database access, all DB accesses are done through stored procedures.

在一个页面上,我有一些操作(插入,更新)  在一个事务中(在同一个数据库上),之后我有一个查询,在这个存储过程中有一个连接到查询LDAP的链接服务器视图。查询给出错误:
由于OLE DB提供程序"ADSDSOObject",因此无法执行请求的操作。对于链接服务器"ADSI"不支持所需的事务接口。

On one page, I have some operations (insert, update) in a transaction (on the same database), after that I have an inquiry, in this stored procedure there is join to linked server view that querying LDAP. The inquiry gives error: The requested operation could not be performed because OLE DB provider "ADSDSOObject" for linked server "ADSI" does not support the required transaction interface.

我的代码具有以下结构,

My code would have the below structure,

Dim trnscope as TransactionScope  = New TransactionScope(TransactionScopeOption.RequiresNew)

Dim trnscope as TransactionScope = New TransactionScope(TransactionScopeOption.RequiresNew)

使用transcope

Using transcope

objA.insert

objA.insert

objB.update

objB.update

transcope.Complete

transcope.Complete

结束使用

transcope.dispose

transcope.dispose

transcope = nothing

transcope = nothing

objC.Inquiry

objC.Inquiry

objC.Inquiry调用与从LDAP进行查询的链接服务器视图连接的存储过程

objC.Inquiry invoke the stored procedures that join with a linked server view that query from LDAP

在事务之前调用时,相同的objC.Inquiry运行正常发生。

The same objC.Inquiry is run fine when calling before the transaction occurs.

分配给查询呼叫的连接似乎仍与"事务"挂钩。在使用连接池,系统事务,企业库和LDAP时,不确定是否是混淆的结果。 运行  debug
模式,我看到Transaction.Current是"没有"的。在Dispose之后和执行objC.Inquiry时。该错误似乎表明objC.inquiry中使用的连接具有"事务"和"事务"。上下文。

It seems the connection assigned to the inquiry call still hook with "transaction". Not sure if it is the result of confict when using Connection Pool, System Transaction, Enterprise Library and LDAP together. Run the application in debug mode, I see Transaction.Current is "nothing" after the Dispose and when executing the objC.Inquiry. The error seems to indicate the connection used in objC.inquiry has "transaction" context.

我的问题类似于
http://forums.lhotka.net/forums/p/7927/37895.aspx
 但我需要一个不同的解决方案,而不是在业务层中添加一个函数,并使用System.Directory Services来查询LDAP

My issue is similar to the post http://forums.lhotka.net/forums/p/7927/37895.aspx but I need a different solution than adding a function in the business layer and use System.Directory Services to query LDAP

推荐答案

我遇到了同样的问题。你能解决吗? 

I am having same problem that you had. Were you able to resolve it? 


这篇关于完成事务后无法查询LDAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆