U4-9799 - Session State Serialization issue on Validate Password Reset

Created by Dave Long 21 Apr 2017, 05:17:23 Updated by Shannon Deminick 10 May 2017, 05:07:27

Tags: PR

Subtask of: U4-9609

When Running Umbraco in a load balanced environment, using SQLServer as Session State click on the Password Reset link received in the "Forgot Password" email, you get an Error of: (Have not tested but assume same will occur when using ASPState Server)

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.

Stack Trace Below:

[SerializationException: Type 'Umbraco.Web.Models.ValidatePasswordResetCodeModel' in Assembly 'umbraco, Version=1.0.6185.24089, Culture=neutral, PublicKeyToken=null' is not marked as serializable.] System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +10494195 System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +230 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +121 System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +178 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +394 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArrayMember(WriteObjectInfo objectInfo, NameInfo arrayElemTypeNameInfo, Object data) +527 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo) +880 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +655 System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +446 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) +1666

Comments

Dave Long 21 Apr 2017, 07:12:24

Initiated pull request #1898


Shannon Deminick 30 Apr 2017, 09:40:32

PR for review: https://github.com/umbraco/Umbraco-CMS/pull/1898#issuecomment-298214406


Shola 05 May 2017, 20:03:13

@Shandem @davelong Thanks for this! I just ran into this issue. idea when 7.5.14 will be released? It doesn't seem to be in the progress tracker but I could be wrong.


Shannon Deminick 09 May 2017, 03:38:35

Oops, forgot to add to OUR, it's there now: https://our.umbraco.org/contribute/progress


Shola 09 May 2017, 16:02:41

@Shandem thanks a bunch!


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted: Pull request

Affected versions: 7.5.6

Due in version: 7.5.14

Sprint:

Story Points:

Cycle: 1