Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
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