1

I am attempting to set a default transaction timeout setting in my web.config of my ASP.NET MVC 4 application. I place the following between the end tag of and the start of

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

This works fine in my local development environment and on one of our development servers, but on a test server I receive a yellow screen of death with a parse error indicating that the element is not recognized.

What should I be looking for in the machine.config or applicationhost.config that would be preventing the setting from being recognized?

3
  • You've placed <system.transactions> as a first level child of <configuration>, right?
    – StuartLC
    Mar 18, 2015 at 15:06
  • I agree, its usually "placement". Mar 18, 2015 at 15:07
  • Yes, it is a direct child of "configuration". Mar 18, 2015 at 15:31

1 Answer 1

0

This paramter must be defined in machine.config of your IIS.

Path: C:\Windows\Microsoft.NET\Framework64\[your Framework version]\Config\

And there you can to define where you will override this later. By default, you cannot override this parametr in web.config of your application and in this code.

After that you should read about transaction escalation Transaction Management Escalation

What kind of transaction will be it is depend from used resources type. (on local machine by shared memory, or distributed tran with DB on another machine).

I saw different behaivors. When I used two servers (SQLSERVER and IIS) then System.Transactions was escaleted to distribute transaction and Timeout parameter defined in machine.config works fine. But when SQLSERVER and IIS was on the same machine - timeout was ingored, and I can't understand why(( In this case system transaction was not escalated to distributed transaction (I saw it in sys.dm_tran_active_transactions), and I expected that Timeout will be 10 minutes (default). But this transaction work several hours.

I am trying to figure it out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.