Guy Barrette, Microsoft, Regional Director, Montreal, Canada, Visual Studio, .NET Expertise System.Transactions Timeout - Guy Barrette

Guy Barrette

Microsoft Regional Director, Montreal, Canada

System.Transactions Timeout

When debugging code that creates database transactions using TransactionScope, you may have an odd error when commiting.  That's because the default transaction timeout is 1 minute.  You can increase the timeout value in the TransactionScope constructor or in the config file like this:

<configuration>
 <system.transactions>
  <defaultSettings timeout="00:05:00" />
 </system.transactions>
</configuration>

Posted: Sep 28 2008, 08:11 AM by guybarrette | with 1 comment(s)
Filed under:

Comments

David said:

Hi,

If I place

<configuration>

<system.transactions>

 <defaultSettings timeout="00:05:00" />

</system.transactions>

</configuration>

in machine.config, I get the error

Unrecognized configuration section system.transactions

If I place it in web.config, I get this error

Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element.

What could be wrong? Please advise. Thanks in advance.

# November 30, 2008 9:44 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)