Transaction Not Available

Can I run code under a flowed-in transaction from within a message inspector?

The setup work for the service transaction is done shortly before the actual call to the implementation of the service operation. The service transaction is not guaranteed to be available for any of these extensibility points (although for certain kinds of transacted service operations the transaction will be available because it's created much earlier, such as a transacted queue receive):

- ServiceAuthenticationManager.Authenticate

  • IDispatchMessageInspector.AfterReceiveRequest

The actual creation of the transaction scope that will be used comes even further after IInstanceProvider.GetInstance.