Patrick Patrick - 1 year ago 196
C# Question

Transaction scope timeout on 10 minutes

I have a long running

in C#. I told the scope that it should have a long timespan, but still I get a timeout. What could cause this?

TransactionOptions transactionOptions = new TransactionOptions();
transactionOptions.IsolationLevel = IsolationLevel.ReadCommitted;
transactionOptions.Timeout = TimeSpan.MaxValue;
using (var ts = new TransactionScope(TransactionScopeOption.Required, transactionOptions))

Answer Source

Hello you can verify maxTimeout in your config file, if you don't have this section on your web.config or app.config

Verify your machine.config

    <machineSettings maxTimeout=""/>

Adjust the value

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download