Session State in Back Office
Session State in Back Office
We are testing for a client that will be deploying in a web farm. We configured Sql Session State to manage the web site. Everything test fine on the site. We navigated to the following page in he back office
/Admin/Products/Reviews/Default.aspx
We raised the following error
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.
Thanks
Thomas
/Admin/Products/Reviews/Default.aspx
We raised the following error
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.
Thanks
Thomas
Re: Session State in Back Office
Not sure what this means. Can you please explain?We configured Sql Session State to manage the web site.
Re: Session State in Back Office
Please give a try to this solution. Edit the App_Code/SearchCriteriaCache.cs file
and locate the following class
and mark this class as serializeable by putting an attribute upon it as below
and locate the following class
Code: Select all
public class SearchCriteria
{
public Dictionary<string, object> Arguments;
public int PageIndex;
public string SortExpression;
public SortDirection SortDirection;
public SearchCriteria()
{
Arguments = new Dictionary<string, object>();
PageIndex = 0;
SortExpression = string.Empty;
SortDirection = SortDirection.Ascending;
}
}
Code: Select all
[Serializable]
public class SearchCriteria
{
public Dictionary<string, object> Arguments;
public int PageIndex;
public string SortExpression;
public SortDirection SortDirection;
public SearchCriteria()
{
Arguments = new Dictionary<string, object>();
PageIndex = 0;
SortExpression = string.Empty;
SortDirection = SortDirection.Ascending;
}
}
Last edited by mazhar on Mon Oct 20, 2008 11:06 am, edited 1 time in total.
Re: Session State in Back Office
Thanks AbleCommerce Developers
Thomas
Thomas
Re: Session State in Back Office
Found a new page that has the same error message.
It appears to be from the line of code.
OrderSearchCriteria criteria = Session["OrderSearchCriteria"] as OrderSearchCriteria;
I think this object needs tagged as Serializable, but it is contained in one of Able Commerce's assemblies.
/Admin/Orders/Default.aspx
Thanks
Thomas
It appears to be from the line of code.
OrderSearchCriteria criteria = Session["OrderSearchCriteria"] as OrderSearchCriteria;
I think this object needs tagged as Serializable, but it is contained in one of Able Commerce's assemblies.
/Admin/Orders/Default.aspx
Thanks
Thomas
Last edited by trozzi on Tue Aug 19, 2008 11:51 am, edited 1 time in total.
Re: Session State in Back Office
This time the solution is not simple.
The object that needs to be Serializable in this case is in the compiled DLL.
It is CommerceBuilder.Reporting.OrderSearchCriteria.
A DLL update would be needed to get this fixed.
I have escalated this case in our bug tracking system. We will see if a patch could be provided for this.
The object that needs to be Serializable in this case is in the compiled DLL.
It is CommerceBuilder.Reporting.OrderSearchCriteria.
A DLL update would be needed to get this fixed.
I have escalated this case in our bug tracking system. We will see if a patch could be provided for this.
Re: Session State in Back Office
Another Page
/Admin/Website/Scriptlets/ConLibHelp2.aspx
I greped the admin area for "Session[" and I found these others that look like they may be in the same category...
ConLibHelp.aspx.cs
ConLibHelp2.aspx.cs
ConLibHelpAll.aspx.cs
Thanks
Thomas
/Admin/Website/Scriptlets/ConLibHelp2.aspx
I greped the admin area for "Session[" and I found these others that look like they may be in the same category...
ConLibHelp.aspx.cs
ConLibHelp2.aspx.cs
ConLibHelpAll.aspx.cs
Thanks
Thomas
Re: Session State in Back Office
Yes we have identified the above as well as ConLib/SimilarProducts.ascx.cs as potential candidates for such errors.
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Re: Session State in Back Office
I have a client that just upgraded to 7.03 and is still getting this message. According to bug 7075, this should have been fixed in 7.0. I have pasted the exact error we are getting below. The error occurs when attempting to access the Manage/Users screen.
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.
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:
[SerializationException: Type 'CommerceBuilder.Users.UserSearchCriteria' in Assembly 'CommerceBuilder, Version=7.3.12065.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +2700482
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +245
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +88
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +175
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +50
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +438
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +131
System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1513
[HttpException (0x80004005): 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.]
System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1602
System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer) +34
System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer) +627
System.Web.SessionState.SessionStateUtility.Serialize(SessionStateStoreData item, Stream stream) +257
System.Web.SessionState.SessionStateUtility.SerializeStoreData(SessionStateStoreData item, Int32 initialStreamSize, Byte[]& buf, Int32& length) +60
System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +114
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +476
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- mfreeze
- Commodore (COMO)
- Posts: 421
- Joined: Mon Jan 24, 2005 2:07 pm
- Location: Washington, NJ
- Contact:
Re: Session State in Back Office
Can someone at Able take a look at this error, please?
Mary E Freeze
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
Freeze Frame Graphics
Web Hosting and Design, ASP and CFMX Development
http://www.ffgraphics.com
- Logan Rhodehamel
- Developer
- Posts: 4116
- Joined: Wed Dec 10, 2003 5:26 pm
Re: Session State in Back Office
Bug 8148.. same error message, different code problem.
http://help.ablecommerce.com/upgrades/a ... _7.0.3.htm
It should be corrected by the latest CommerceBuilder.DLL. Please let me know if not.
http://help.ablecommerce.com/upgrades/a ... _7.0.3.htm
It should be corrected by the latest CommerceBuilder.DLL. Please let me know if not.
Cheers,
Logan
.com
If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.
Logan

If I do not respond to an unsolicited private message, it's not because I'm ignoring you. It's because the answer to your question is valuable to others. Try the new topic button.