locked
Help with E_ACCESSDENIED exception RRS feed

  • Question

  • I am having a problem with persisting workflow instances when I use the DefaultWorkflowCommitWorkBatchService coupled with the Persistence and Tracking Services. 

    Here's our current configuration:

    We are hosting the workflow runtime in IIS on a Window Server 2003 SP1 server.  Our tracking and persistence tables/etc. are hosted in the same database that resides on a separate database server which is also Windows Server 2003 SP1.  DTC is enabled and runniing on both servers.

    One of our activities adds an object to the IPendingWork work batch that writes an entry to a database (fyi, this happens to be the same database where we are hosting the tracking and persistence tables).  Initially, we had the runtime configured with the SharedWorkFlowCommitWorkBatchService, Persistence and Tracking services enabled.  However, as soon as the Commit method was called on our activity and it attempted to open a new connection to write its entry to the database it threw a "Promotion not supported on local transaction" exception.  After consulting with some people on the Workflow team, we learned that we could not use the SharedConnectionWorkFlowCommitWorkBatchService in our system because this service creates a special transaction that cannot be promoted and is internally managed to have 2 and only 2 connections (tracking and persistence). 

    Because our scenario requires the use of DTC and we are needing to specifically promote the transaction being used for workflow persistence, they suggested that we use the DefaultWorkFlowCommitWorkBatchService instead. 

    However, as soon as we did this, we received the following error

     Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

    I did some research online and learned that COM methods report errors by returning HRESULTs and .NET methods report them by throwing exceptions, E_ACCESSDENIED = Access is Denied.  So, my initial thinking is that this exception is being thrown because of a problem with executing a COM object from ASP.NET.

    I did some further research to see if anyone else had come across this problem before and found the following post on one of the Microsoft forums.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=640816&SiteID=1

    Reading this post leads me to believe that either the DTC or DCOM configuration or the security descriptor on our servers is not correct, which is where I need someone's help.

    Would anyone know what the correct configuration of DTC or DCOM when hosting the runtime on one server and the tracking/persistence database on another? Furthermore, would anyone be able to look at our security descriptor to see if anything stands out as being incorrect or missing? 

    I've attached both the security descriptor, workflow trace, and a description of our DTC configuration below to see if this might help.

    Security Descriptor

    D:(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;CCDCLCSWRP
    WPDTLOCRSDRCWDWO;;;SY)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

    Workflow Trace 

    Runtime Start: 0 : Workflow Runtime tracer is alive!
    Runtime Information: 0 : Adding context 1:JobWorkflow
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 47971044
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 11221016
    Runtime Information: 0 : Activity Status Change - Activity: JobWorkflow Old:Initialized; New:Executing
    Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity JobWorkflow
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 56974020
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: ActivityOperation((1)JobWorkflow, Execute)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: ActivityOperation((1)JobWorkflow, Execute)
    Runtime Information: 0 : Activity Status Change - Activity: transferData1 Old:Initialized; New:Executing
    Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity transferData1
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 56516768
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: ActivityOperation((1)transferData1, Execute)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: ActivityOperation((1)JobWorkflow, Execute)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: ActivityOperation((1)transferData1, Execute)
    Runtime Information: 0 : Queuing Service: Creating new Queue with ID 740977636 for 64702ef4-4e5a-45a8-8a6d-06ff2cfcd9b8
    Runtime Information: 0 : WorkflowQueue:QueueItemAvailable subscribe for activity 'transferData1' with context Id 1
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: ActivityOperation((1)transferData1, Execute)
    Runtime Information: 0 : Workflow Runtime: WorkflowExecutor: workflow instance '7b8de52c-3f92-4d5a-a8a9-1a355cfda565' has no work.
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 25879650
    Runtime Information: 0 : Workflow Runtime: WorkflowExecutor: Got an unload request for instance 7b8de52c-3f92-4d5a-a8a9-1a355cfda565
    Runtime Information: 0 : Workflow Runtime: WorkflowExecutor: Unloading instance 7b8de52c-3f92-4d5a-a8a9-1a355cfda565
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 31590262
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 8674443
    Runtime Information: 0 : pending work hc 43769104 added workItem hc 58377623
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : Workflow Runtime: WorkflowExecutor: Persist attempt on instance '7b8de52c-3f92-4d5a-a8a9-1a355cfda565' threw an exception 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))' at    at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
       at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
       at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext)
       at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 14198754
    Runtime Information: 0 : Activity Status Change - Activity: JobWorkflow Old:Executing; New:Faulting
    Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity JobWorkflow
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 60679928
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: ActivityOperation((1)JobWorkflow, HandleFault)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: ActivityOperation((1)JobWorkflow, HandleFault)
    Runtime Information: 0 : Activity Status Change - Activity: transferData1 Old:Executing; New:Canceling
    Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity transferData1
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 9248440
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: ActivityOperation((1)transferData1, Cancel)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: ActivityOperation((1)JobWorkflow, HandleFault)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: ActivityOperation((1)transferData1, Cancel)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: SubscriptionEvent((1)transferData1, ActivityStatusChange('(1)transferData1', Canceling, Canceled))
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: ActivityOperation((1)transferData1, Cancel)
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: SubscriptionEvent((1)transferData1, ActivityStatusChange('(1)transferData1', Canceling, Canceled))
    Runtime Information: 0 : Activity Status Change - Activity: transferData1 Old:Canceling; New:Closed
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: SubscriptionEvent((1)JobWorkflow, ActivityStatusChange('(1)transferData1', Closed, Canceled))
    Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity transferData1
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 16127101
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: SubscriptionEvent((1)transferData1, ActivityStatusChange('(1)transferData1', Canceling, Canceled))
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: SubscriptionEvent((1)JobWorkflow, ActivityStatusChange('(1)transferData1', Closed, Canceled))
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Scheduling entry: SubscriptionEvent((1)JobWorkflow, ActivityStatusChange('(1)JobWorkflow', Faulting, Faulted))
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: SubscriptionEvent((1)JobWorkflow, ActivityStatusChange('(1)transferData1', Closed, Canceled))
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Running scheduled entry: SubscriptionEvent((1)JobWorkflow, ActivityStatusChange('(1)JobWorkflow', Faulting, Faulted))
    Runtime Information: 0 : Activity Status Change - Activity: JobWorkflow Old:Faulting; New:Closed
    Tracking Information: 0 : TrackingListener::ActivityStatusChange - Received Activity Status Change Event for activity JobWorkflow
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 10926182
    Runtime Critical: 0 : Uncaught exception escaped to the root of the workflow.
        In instance 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 in activity
    Inner exception: System.Workflow.Runtime.Hosting.PersistenceException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ---> System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
       at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
       at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext)
       at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
       --- End of inner exception stack trace ---
       at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
       at System.Workflow.Runtime.WorkflowExecutor.ProtectedPersist(Boolean unlock)
    Runtime Information: 0 : Workflow Runtime: WorkflowExecutor: Terminating instance 7b8de52c-3f92-4d5a-a8a9-1a355cfda565
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 43066942
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 52058165
    Runtime Information: 0 : pending work hc 43769104 added workItem hc 65870306
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : SqlWorkflowPersistenceService(00000000-0000-0000-0000-000000000000): Exception thrown while persisting instance: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
    Runtime Error: 0 : stacktrace :    at System.Transactions.Oletx.IDtcProxyShimFactory.ConnectToProxy(String nodeName, Guid resourceManagerIdentifier, IntPtr managedIdentifier, Boolean& nodeNameMatches, UInt32& whereaboutsSize, CoTaskMemHandle& whereaboutsBuffer, IResourceManagerShim& resourceManagerShim)
       at System.Transactions.Oletx.DtcTransactionManager.Initialize()
       at System.Transactions.Oletx.DtcTransactionManager.get_ProxyShimFactory()
       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.EnlistNonNull(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.Enlist(Transaction tx)
       at System.Data.SqlClient.SqlInternalConnection.EnlistTransaction(Transaction transaction)
       at System.Data.SqlClient.SqlConnection.EnlistTransaction(Transaction transaction)
       at System.Workflow.Runtime.Hosting.DbResourceAllocator.GetEnlistedConnection(WorkflowCommitWorkBatchService txSvc, Transaction transaction, Boolean& isNewConnection)
       at System.Workflow.Runtime.Hosting.PersistenceDBAccessor..ctor(DbResourceAllocator dbResourceAllocator, Transaction transaction, WorkflowCommitWorkBatchService transactionService)
       at System.Workflow.Runtime.Hosting.SqlWorkflowPersistenceService.System.Workflow.Runtime.IPendingWork.Commit(Transaction transaction, ICollection items)
    Runtime Error: 0 : Workflow Runtime: WorkflowExecutor: Persist attempt on instance '7b8de52c-3f92-4d5a-a8a9-1a355cfda565' threw an exception 'Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))' at    at System.Workflow.Runtime.Hosting.WorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
       at System.Workflow.Runtime.Hosting.DefaultWorkflowCommitWorkBatchService.CommitWorkBatch(CommitWorkBatchCallback commitWorkBatchCallback)
       at System.Workflow.Runtime.WorkflowExecutor.CommitTransaction(Activity activityContext)
       at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
    Runtime Error: 0 : Workflow Runtime: WorkflowExecutor: Persistence attempt at instance '7b8de52c-3f92-4d5a-a8a9-1a355cfda565' termination threw an exception. Aborting the instance. The termination event would be raised. The instance would execute from the last persisted point whenever started by the host explicitly. Exception:Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
       at System.Workflow.Runtime.WorkflowExecutor.Persist(Activity dynamicActivity, Boolean unlock, Boolean needsCompensation)
       at System.Workflow.Runtime.WorkflowExecutor.TerminateOnIdle(String error)
    Runtime Information: 0 : pending work hc 34051556 added workItem hc 55961846
    Runtime Information: 0 : Workflow Runtime: WorkflowExecutor: Aborting instance 7b8de52c-3f92-4d5a-a8a9-1a355cfda565
    Runtime Information: 0 : pending work hc 43769104 added workItem hc 33894570
    Runtime Information: 1 : Workflow Runtime: Scheduler: InstanceId: 7b8de52c-3f92-4d5a-a8a9-1a355cfda565 : Done with running scheduled entry: SubscriptionEvent((1)JobWorkflow, ActivityStatusChange('(1)JobWorkflow', Faulting, Faulted))

    Security Settings

    The following options are enabled on both servers:

    Network DTC Access 

    Client and Administration:  Allow Remote Administration

    Transaction Manager Communication:  Allow Inbound, Allow Outbound, Mutual Authentication Required

    Enable XS Transactions

    DTC Logon account runs as NT Authority\Network Service

     

    Monday, November 6, 2006 7:52 PM

Answers

  • It is likely that this is the issue.  The ACL you have is very strange as it restricts access to System, Admins and Power Users.  It appears that someone has altered the installed ACL; in general, it should appear closer to the one described in the post you refer to.  In any event, the ACL is not what should be assigned to MSDTC.  To fix the ACL problem, run the following command: 

    %windir%\system32\sc.exe sdset MSDTC D:(A;;CCLCSWRPRC;;;WD)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCLCSWRPLOCRRC;;;S-1-2-0)(A;;CCLCSWRPLORC;;;NS)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

    I cannot guarantee that this fixes the issue you are experiencing, but the ACL needs to be fixed in any case.  I'm sorry that you have been waiting this long.  This issue got assigned to me just as I was going on vacation. 

    Hope this helps. 

    -Richard

    Monday, November 27, 2006 6:16 PM

All replies

  • It is likely that this is the issue.  The ACL you have is very strange as it restricts access to System, Admins and Power Users.  It appears that someone has altered the installed ACL; in general, it should appear closer to the one described in the post you refer to.  In any event, the ACL is not what should be assigned to MSDTC.  To fix the ACL problem, run the following command: 

    %windir%\system32\sc.exe sdset MSDTC D:(A;;CCLCSWRPRC;;;WD)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;CCLCSWLOCRRC;;;AU)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCLCSWRPLOCRRC;;;S-1-2-0)(A;;CCLCSWRPLORC;;;NS)S:(AU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

    I cannot guarantee that this fixes the issue you are experiencing, but the ACL needs to be fixed in any case.  I'm sorry that you have been waiting this long.  This issue got assigned to me just as I was going on vacation. 

    Hope this helps. 

    -Richard

    Monday, November 27, 2006 6:16 PM
  • Oh, no worries.  I'll ask our system administrator to run the command you provided hopefully sometime before the end of the week.  I'll keep you posted...literally! Thanks so much for your reply, I really appreciate it!
    Thursday, November 30, 2006 5:10 AM
  • I Used

    sc sdset MSDTC DSadA;;CCLCSWRPLOCRRC;;;S-1-2-0)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)(A;;CCLCSWRPLORC;;;NS)SSadAU;FA;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;WD)

     

    My MSDTC IS OK,

    But I Dont Know This ACL Describ Mean

    Monday, August 13, 2007 3:49 AM