please help me resolve this problem:
There is an ambient MSMQ transaction. I’m trying to use new transaction for logging, but get next error while attempt to submit changes – ‘Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.’ Here is code:
public static void SaveTransaction(InfoToLog info) { using (TransactionScope scope = new TransactionScope(TransactionScopeOption.RequiresNew)) { using (TransactionLogDataContext transactionDC = new TransactionLogDataContext()) { transactionDC.MyInfo.InsertOnSubmit(info); transactionDC.SubmitChanges(); } scope.Complete(); } }
Please help me. Thx.
You could consider increasing the timeout or eliminating it all together.
Something like:
Be careful