Transaction Problem in upgrading an ASP.Net + C# Application from .Net 2.0 beta to .Net 2.0 prof.

B

Beenz

Hello,
I am developing an application in C#, which was previously in .Net 2005
Beta, then it was working perfectly fine, but from the time I have
upgraded
it to .Net 2.0 Professional, its continously giving me error on the
following line,
transaction = Connection.BeginTransaction();

System.Data.SqlClient.SqlException: New transaction is not allowed
because
there are other threads running in the session.
at System.Data.SqlClient.SqlConnection.OnError(SqlException
exception,
Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateO
bject
stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet
bulkCopyHandler, TdsParserStateObject stateObj)
at
System.Data.SqlClient.TdsParser.TdsExecuteTransactionManagerRequest(Byte
[]
buffer, TransactionManagerRequestType request, String transactionName,
TransactionManagerIsolationLevel isoLevel, Int32 timeout,
SqlInternalTransaction transaction, TdsParserStateObject stateObj)
at
System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransactionYukon(T
ransactionRequest
transactionRequest, String transactionName, IsolationLevel iso,
SqlInternalTransaction internalTransaction)
at
System.Data.SqlClient.SqlInternalConnectionTds.ExecuteTransaction(Transa
ctionRequest
transactionRequest, String name, IsolationLevel iso,
SqlInternalTransaction
internalTransaction)
at
System.Data.SqlClient.SqlInternalConnection.BeginSqlTransaction(Isolatio
nLevel
iso, String transactionName)
at
System.Data.SqlClient.SqlInternalConnection.BeginTransaction(IsolationLe
vel
iso)
at
System.Data.SqlClient.SqlConnection.BeginDbTransaction(IsolationLevel
isolationLevel)
at
System.Data.Common.DbConnection.System.Data.IDbConnection.BeginTransacti
on()

I removed Beta using a Microsoft provided utility. This same project is
running on another machine and giving the very same error. I am logged
in as
admin. and all kind of settings are perfectly fine.
The problem with this error is that its occuring on some actions, while
on
others application works fine. Initially some actions works perfectly
fine but if once this error starts coming on that particular location,
its keep on coming exactly on the same location, reboot don't have any
effect on this.
Multiple Active Results sets is on.
This error has made our application extremely unstable. quick help will
be appreciated.

Beenish Sahar Khan,
Software Developer,
Kolachi Advanced Technologies
 
G

Guest

1. is there any sort of "database connetion pool" running behind?

2. try to change the
IsolationLevel
to
Serializable
NOTE: tune the transaction depending on the app data accessing patern

regards
 
B

Beenish Sahar Khan

Ashura, thanks for your reply, we were actually leaving some DataReaders
open, which was causing problem, thanks alot for your reply.
regards,
Beenish Sahar Khan
 

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