Webservice Transaction Timeout -
05-10-2006
, 02:18 AM
I have a VB webservice that performs a lengthly update on several SQL tables. I tried the <webmethod(transactionOption:=RequiresNew)> syntax and continually encountered a transaction timeout after 60 or so seconds.
I then removed the TransactionOption from the method declaration and added the following code in the body of the method:
Dim myTrans As New TransactionAttribute(TransactionOption.RequiresNew )
myTrans.Timeout = 800
myTrans.Isolation = TransactionIsolationLevel.Serializable
This seems to work. I would just like validation from someone that it is equlivant to the webmethod declaration approach. Thanks. |