InvalidOperationException
Posted: Wed Nov 17, 2021 12:07 pm
Hello,
We are occasionally getting two exceptions when trying to add notes to an order through some of our custom code. We are unable to reproduce it reliably and, as a result, have been unable to find the root cause. We were hoping someone could shed some light on what causes the following exceptions to be thrown by Select. Hopefully, we can then track down what exactly it is we're doing that is causing these exceptions from Select and fix it.
and
We are occasionally getting two exceptions when trying to add notes to an order through some of our custom code. We are unable to reproduce it reliably and, as a result, have been unable to find the root cause. We were hoping someone could shed some light on what causes the following exceptions to be thrown by Select. Hopefully, we can then track down what exactly it is we're doing that is causing these exceptions from Select and fix it.
Code: Select all
System.InvalidOperationException: Failed to add item.
at SoftPro.ClientModel.Proxies.FaultTolerantClientChannel`1.HandleFaultException(FaultException exception)
at SoftPro.ClientModel.Proxies.FaultTolerantClientChannel`1.InvokeCall(String action, Object[] args)
at SoftPro.OrderTracking.Client.Orders.OrderStoreServiceClient.OpenOrder(OrderIdentifier id, OrderEditMode mode, Boolean exclusiveLock)
at SoftPro.OrderTracking.Client.Orders.OrderStore.OpenOrder(OrderIdentifier id, OrderEditMode mode, Boolean exclusiveLock)
at SoftPro.OrderTracking.Client.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.OpenOrder(IOrderInfo orderInfo, OrderEditMode mode, Boolean exclusiveLock)
at SoftPro.OrderTracking.Client.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.OpenOrder(IOrderInfo orderInfo, OrderEditMode mode)
Code: Select all
System.InvalidOperationException: Operation is not valid due to the current state of the object.
at SoftPro.ClientModel.AsyncResult`1.get_Result()
at SoftPro.OrderTracking.Client.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.EndApplyChanges(IAsyncResult ar)
at SoftPro.OrderTracking.Client.Orders.OrderStore.SoftPro.OrderTracking.Client.Orders.IOrderStore.ApplyChanges(IOrder order)