Discussions

Ask a Question
Back to All

AddItem throws Object Not Set to Instance of Item

I have an older version of iMIS. Something changed in iMIS and now our custom cart code throws an Object not Set to instance of item...

we suspect it may be payment methods or shipping method. Here is stack trace on cart.AddItem()
Server Error in '/processor' Application.
Error: Service Error: Object reference not set to an instance of an object.
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 the code.

Exception Details: System.ServiceModel.FaultException: Error: Service Error: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FaultException: Error: Service Error: Object reference not set to an instance of an object.
]
Asi.Soa.ClientServices.CartManager.AddLine(OrderLineData line, Uri websiteEditUrl) +497
Asi.Soa.ClientServices.CartManager.AddItem(String itemId, Decimal quantity, Uri websiteEditUrl, String sourceCode, String shipToPartyId, String orderLineNote) +755
Asi.Soa.ClientServices.CartManager.AddItem(String itemId, Decimal quantity, Uri websiteEditUrl, String sourceCode, String shipToPartyId) +97
Asi.Soa.ClientServices.CartManager.AddItem(String itemId, Decimal quantity, Uri websiteEditUrl, String sourceCode) +88
Asi.Soa.ClientServices.CartManager.AddItem(String itemId, Decimal quantity, Uri websiteEditUrl) +79
Asi.Soa.ClientServices.CartManager.AddItem(String itemId, Decimal quantity) +67
USPTA_InsurancePurchase.USPTA_InsurancePurchaseDisplay.btnCheckout_Click(Object sender, EventArgs e) in c:\Users\ascension\Source\Repos\uspta\USPTA_InsurancePurchase\USPTA_InsurancePurchase\USPTA_InsurancePurchaseDisplay.ascx.cs:553
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +11765069
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +150
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1665