Enterpriseservices namespace and Timeout

G

Guest

Hi all

I am using System.enterpriseservices in a class library. I am calling a
stored procedure within this class procedure. This procedure is taking a long
time to execute and after some time I get the follwoing error
"Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction."

It is working fine with less records. If I change the timeout from MTS
option tab then it is working fine . I know the solution here is to increase
the timeout value. But I have no access to the productin server where the web
application woudl be finally deployed. I need to know how to increase the
MTS Transaction through code for a single class and to again reset it back.

Thanks
pradeep_TP
 
F

Florin Lazar [MSFT]

You should be able to use the Timeout member of the Transaction attribute,
http://msdn.microsoft.com/library/d...icestransactionattributeclasstimeouttopic.asp:
[Transaction(TransactionOption.Required, Timeout=60)]
public class Account : ServicedComponent
{
[AutoComplete]
public void Post(int accountNum, double amount)
{
...
}
}Regards,

--
Florin Lazar - Microsoft - [ http://blogs.msdn.com/florinlazar ]
<Enjoy transactional programming with System.Transactions!>
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


Hi all

I am using System.enterpriseservices in a class library. I am calling a
stored procedure within this class procedure. This procedure is taking a
long
time to execute and after some time I get the follwoing error
"Distributed transaction completed. Either enlist this session in a new
transaction or the NULL transaction."

It is working fine with less records. If I change the timeout from MTS
option tab then it is working fine . I know the solution here is to increase
the timeout value. But I have no access to the productin server where the
web
application woudl be finally deployed. I need to know how to increase the
MTS Transaction through code for a single class and to again reset it back.

Thanks
pradeep_TP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top