Transaction timeout expired while using Linq2Sql DataContext.SubmitChanges()

Posted by user68923 on Stack Overflow See other posts from Stack Overflow or by user68923
Published on 2009-04-13T10:14:46Z Indexed on 2010/06/08 18:12 UTC
Read the original article Hit count: 713

Filed under:
|
|

Hi guys, 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.

© Stack Overflow or respective owner

Related posts about wcf

Related posts about linq-to-sql