I m occasionally getting this exception, and don t seem to be able to find anything here on SO or google that can shed some insight as to 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() ...
我的法典相当直截了当。
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(); //sometimes fails???
//... execute a stored procedure that calls dbms_aq.dequeue()
}
//... return dequeued message or null if queue is empty
}
My connection string looks like the following: Data Source=abc;User ID=test1;Password=test1;Pooling=true;Validate Connection=True
耗氧潜能吨
为什么在我明确制造一个已经存在的交易?