Checkout Process fails when using SQL Sesion Provider

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
After submitting the payment details screen NOP throws an exception if you are using SQL as the session provider.

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.

This seems to be caused by the following classes not being marked as serializable:
NOP.Core.BaseEntity
Nop.Core.Domain.Customers.Customer
Nop.Core.Domain.Orders.Order
Nop.Services.Payments.ProcessPaymentRequest

Potentially more classes need to be markd dependending on the configuration of nop used.

NOP Version: 2.20
SQL Version: 2008 Express (10.0.4000)
12 years ago
I can confirm that this is still a problem in version 2.30.  Is there any reason that the classes haven't been marked as [Serializable]?
12 years ago
Thanks for reporting. I'll create a work item for this task
12 years ago
I've been playing with my own copy of the source code, and the [Serializable] attribute really needs to be applied to all of the classes descending from the BaseEntity class in case they are ever stored in the session.  The ones listed are just the ones that the check out process uses (and possibly the only ones currently stored in the session heap).
12 years ago
Fixed. Please see changeset a8644bd18ab4
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.