I am trying to wrap some DB calls in a com transaction for testing
purposes (make a bunch of calls to the DB, check if they look right,
rollback any changes, move on to next test).
So far it works fine running against a local SQL Server, but I can't
get it to work against our actual development server.
I have tried messing around with the Security area of DTC settings on
both my machine and the server, allowed inbound and outbound
connections, enabled network, turned off my firewall etc.
Of course the only message I get when trying to open an ADO.NET
connection against our sql server is:
An error occurred while enlisting in a distributed transaction.
This exception is being fired on
SqlInternalConnection.EnlistNonNullDistributedTransaction(ITransaction
transaction).
The code I am using is as follows:
Dim config As New ServiceConfig
config.Transaction = TransactionOption.RequiresNew
ServiceDomain.Enter(config)
'*** try to access the DB
If ContextUtil.IsInTransaction Then
ContextUtil.SetAbort()
End If
ServiceDomain.Leave()
Can anyone give me any advice as to anything I can check, or probably
better would be if there was any way that I can find out more
information about why my transaction is not working. I see stuff about
tracing but I can't seem to find any of that information. There is
nothing in my event viewer.
Any help?
cmay - 22 Mar 2006 17:04 GMT
No one?
:(
> I am trying to wrap some DB calls in a com transaction for testing
> purposes (make a bunch of calls to the DB, check if they look right,
[quoted text clipped - 36 lines]
>
> Any help?