Hi, we've got an .NET application that consists of 3 parts:
- Front-end
- Webservices(calls stored procs in to read and wite in/out of the database)
- SQL Express Database
The webservices and database sits on a server but, for debugging, the webservices are also on my local IIS.
I'm experiencing a problem on my workstation ONLY when using my local IIS webservices. It is the exact same services and structure as on the server and fellow developers.
this is the exception I get:
System.Transactions.TransactionException was caught
Message="The operation is not valid for the state of the transaction."
Source="System.Transactions"
StackTrace:
at System.Transactions.TransactionState.EnlistPromotableSinglePhase(InternalTransaction tx,
IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
at System.Transactions.Transaction.EnlistPromotableSinglePhase(
IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables,
Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at AVAF.Server.DataAccess.SqlStoredProcedure.ExecuteDataSet() in
E:\TCS\AVAF.Server\DataAccess\SqlStoredProcedure.cs:line 191
InnerException: System.TimeoutException
Message="Transaction Timeout"
InnerException:
System.Transactions.TransactionException was unhandled
Message="The operation is not valid for the state of the transaction."
Source="System.Transactions"
StackTrace:
at System.Transactions.TransactionState.EnlistPromotableSinglePhase(InternalTransaction tx,
IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
at System.Transactions.Transaction.EnlistPromotableSinglePhase(
IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
InnerException: System.TimeoutException
Message="Transaction Timeout"
InnerException:
System.Transactions.TransactionException was unhandled
Message="The operation is not valid for the state of the transaction."
Source="System.Transactions"
StackTrace:
at System.Transactions.TransactionState.EnlistPromotableSinglePhase(InternalTransaction tx,
IPromotableSinglePhaseNotification promotableSinglePhaseNotification, Transaction atomicTransaction)
at System.Transactions.Transaction.EnlistPromotableSinglePhase(
IPromotableSinglePhaseNotification promotableSinglePhaseNotification)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
InnerException:
System.Transactions.TransactionManagerCommunicationException was unhandled
Message="Network access for Distributed Transaction Manager (MSDTC) has been disabled. Please enable DTC for
network access in the security configuration for MSDTC using the Component Services Administrative tool."
Source="System.Transactions"
StackTrace:
at System.Transactions.Oletx.OletxTransactionManager.ProxyException(COMException comException)
at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(
Byte[] propagationToken)
at System.Transactions.TransactionStatePSPEOperation.PSPEPromote(InternalTransaction tx)
at System.Transactions.TransactionStateDelegatedBase.EnterState(InternalTransaction tx)
at System.Transactions.EnlistableStates.Promote(InternalTransaction tx)
at System.Transactions.Transaction.Promote()
at System.Transactions.TransactionInterop.ConvertToOletxTransaction(Transaction transaction)
at System.Transactions.TransactionInterop.GetExportCookie(Transaction transaction, Byte[] whereabouts)
at System.Data.SqlClient.SqlInternalConnection.GetTransactionCookie(Transaction transaction,
Byte[] whereAbouts)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNull(Transaction tx)
at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
at System.Data.SqlClient.SqlInternalConnectionTds.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection,
DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
InnerException: System.Runtime.InteropServices.COMException
Message="The transaction manager has disabled its support for remote/network
transactions. (Exception from HRESULT: 0x8004D024)"
Source="System.Transactions"
ErrorCode=-2147168220
StackTrace:
at System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize,
Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier,
OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim)
at System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(
Byte[] propagationToken)
InnerException:
It happens like this:
- when you log in, the application connects to the webservice and checks if the user is on the database and retrieves profile. (which means that the first Stored procedure call works)
- Then there is a series of Stored proc calls to populate comboboxes used in a search function. This all succeeds.
- When the search is done and an item is selected and opened, more calls are made to retrieve th item information. and for some reason this is where i get the problem. the first call succeeds but the second one fails.
*note that if I swap the 2, both of them fail.
When using the immediate window and mannually open the connection (which at this stage is closed) it fails immediately.
Time-out is set to 2 minutes but i get the error instantly as soon as the call is made.
Any help/ suggestions?
Thank you