London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi,
What's the code you are using? I suspect you might have conflicted scopes of transaction.
/Q
Hi Quan Mai,
Here's the piece of code:
using (var transactionScope = new TransactionScope())
{
try
{
OrderGroupWorkflowManager.RunWorkflow(cart, OrderGroupWorkflowManager.CartCheckOutWorkflowName);
}
catch (Exception ex)
{
if (ex is PaymentException)
throw;
if (ex.InnerException is PaymentException)
throw;
}
// store customer information on cart
cart.CustomerName = CurrentContact.FullName;
cart.CustomerId = CurrentContact.PrimaryKeyId.Value;
cart.OrderForms[0].Payments[0].Status = response.AuthResult;
var purchaseOrder = cart.SaveAsPurchaseOrder();
// store latest order information on contact
CurrentContact.LastOrder = purchaseOrder.Created;
CurrentContact.SaveChanges();
purchaseOrder.Status = response.AuthResult;
AddNoteToPurchaseOrder("New order placed by {0} in {1} site", purchaseOrder,
CurrentContact != null ? CurrentContact.FullName : string.Empty, SiteDefinition.Current.Name);
purchaseOrder.AcceptChanges();
PurchaseOrderManager.UpdatePromotionUsage(cart, purchaseOrder);
//CmoGadgetController.IncreaseOrder(this.CartHelper.LineItems);
cart.Delete();
cart.AcceptChanges();
transactionScope.Complete();
}
Hi,
I'm seeing this exception intermittently when using Transactions and Azure:
Server Error in '/' Application.
The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in thecode.
Exception Details: System.Runtime.InteropServices.COMException: The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)
[COMException (0x8004d024): The transaction manager has disabled its support for remote/network transactions. (Exception from HRESULT: 0x8004D024)]
System.Transactions.Oletx.IDtcProxyShimFactory.ReceiveTransaction(UInt32 propgationTokenSize, Byte[] propgationToken, IntPtr managedIdentifier, Guid& transactionIdentifier, OletxTransactionIsolationLevel& isolationLevel, ITransactionShim& transactionShim) +0
System.Transactions.TransactionInterop.GetOletxTransactionFromTransmitterPropigationToken(Byte[] propagationToken) +315
Has enyone else experienced the same?
/Mark