When deploying ECF on load balanced environments, users may encounter different issues. Here are some troubleshooting tips in case you run into these particular scenarios.
ECF 5.1 Build 24: Serialized Objects Stored in Session Causes Server Error When Viewing a Purchase Order in Commerce Manager
This issue occurs when you are storing session state in SQL Server and those objects stored in session are serialized. You will notice that most pages within ECF Commerce Manager render fine, but when you go to Order Management > Purchase Orders > All, you may encounter a Server Error that looks similar to this:
Server Error in '/' Application.
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.
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.Web.HttpException: 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.
The error appears to be that the PurchaseOrder is not marked as serializable and some other issues related to this. Unfortunately, setting the PurchaseOrder class as serializable does not fix the problem alone.
One possible workaround is to create a stand-alone commerce manager instance that points to the load balanced environment databases and doesn't use SQL session state. Directions for setting this up from the full source can be found at Full Source Code Manual Installation.