Page 1 of 1

Trouble with Transation timeouts

Posted: Fri 16 Jul 2010 13:51
by edstaffin
Hi,
I have been having trouble with the following code. I am trying to a large transaction over a slow connection that takes approximately 35 minutes to run. I end up getting a Transaction timeout error when I do the oScope.complete. Seems to me like I set the timeout to 1 hour+ but I'm still getting a timeout. Any ideas?
Thanks ... Ed

Code: Select all

Using oScope As New TransactionScope TransactionScopeOption.Required, New TimeSpan(1, 1, 1))
            Dim db As New MyDataContext
            ' do stuff
            db.SubmitChanges()
            oScope.Complete()
End Using

Posted: Wed 21 Jul 2010 11:25
by AndreyR
I have made a simple test and timeout worked as expected.
Could you please make a small test project illustrating the error, if possible?
One more thing: is there any InnerException? Possibly the problem is not associated with the timeout.

Posted: Wed 21 Jul 2010 12:09
by edstaffin
Don't think there is an inner exception. When I run it without ANY transaction it runs without error.

Posted: Thu 22 Jul 2010 12:22
by AndreyR
Thank you for the clarification. Waiting for the test project.