Can anyone reproduce this problem?

I'm observing a problem where the DTC bails after ~600s, create a console application and run this against SQL2000...

using System;

using System.Collections.Generic;

using System.Text;

using System.Transactions;

using System.Data.SqlClient;

namespace ConsoleApplicationTXtimeout

{

classProgram

{

staticvoid Main(string[] args)

{

TransactionOptions transactionOptions =newTransactionOptions();

transactionOptions.IsolationLevel =IsolationLevel.ReadCommitted;

//transactionOptions.Timeout = new TimeSpan(0,0,0,30);

transactionOptions.Timeout =newTimeSpan(0);

DateTime started =DateTime.Now;

using (TransactionScope transactionScope =newTransactionScope(TransactionScopeOption.Required,transactionOptions))

{

while (DateTime.Now - started <newTimeSpan(0, 10, 0))

{

using (SqlConnection connection =newSqlConnection("Data Source=MyServer;Initial Catalog=MyDatabase;Integrated Security=SSPI"))

{

connection.Open();

SqlCommand command =newSqlCommand("Update MyTable set MyField = MyField", connection);

command.ExecuteNonQuery();

Console.WriteLine(DateTime.Now);

System.Threading.Thread.Sleep(65000);

}// end connection

}// do 10 mins worth

transactionScope.Complete();

Console.WriteLine(DateTime.Now);

}// end Tx

Console.ReadLine();

}

}

}

[2850 byte] By [pkr2000] at [2007-12-24]
# 1

You are hitting the MaximumTimeout - see my previous post at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=759488&SiteID=1

FlorinLazar-MSFT at 2007-10-8 > top of Msdn Tech,Software Development for Windows Vista,Transactions Programming...

Software Development for Windows Vista

Site Classified