I sometimes get this exception and it seems like I can't find anything here in SO or google that can shed some insight on how to debug this.
System.ArgumentNullException: Value cannot be null.
Parameter name: transaction
at System.Transactions.TransactionInterop.
GetDtcTransaction(Transaction transaction)
at Oracle.DataAccess.Client.OracleConnection.Open()
at RetrieveMessage() ...
My code is pretty simple. RetrieveMessage()- This is a call to pull the message out of the queue, but it does not matter, since it is not just an attempt to open a connection.
using (var scope = new TransactionScope(TransactionScopeOption.Required,
TimeSpan.FromMinutes(10)))
{
message = RetrieveMessage();
scope.Complete();
}
public Message RetrieveMessage()
{
using (var cnn = new OracleConnection(ConnString))
{
cnn.Open();
}
}
My connection string is as follows: Data Source=abc;User ID=test1;Password=test1;Pooling=true;Validate Connection=True
ODP.NET: version 2.112.1.0, .NET Framework 3.5 SP0
Why not make the transaction available if I already created it already?
source
share