Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SerializationException on ListField ViewModels #136

Open
Sumo20 opened this issue Nov 29, 2022 · 0 comments
Open

SerializationException on ListField ViewModels #136

Sumo20 opened this issue Nov 29, 2022 · 0 comments

Comments

@Sumo20
Copy link

Sumo20 commented Nov 29, 2022

Describe the bug
After installing the package we are getting this error on the CD server. how can i fix this. We are using sitecore 9.3 it was fixed in the ver 4.02 release for sitecore 10.1 ver [Serializable] was added to the CheckBoxListWithBindingsViewModel and other ones. The older versions do not have the [Serializable] . it is breaking the forms. How can we fix this

A clear and concise description of what the bug is.
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: System.Web
at System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer)
at System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer)
at System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer)
at Sitecore.SessionProvider.SessionStateSerializer.Serialize(BinaryWriter writer, SessionStateStoreData item)
at Sitecore.SessionProvider.SessionStateSerializer.Compress(SessionStateStoreData item)
at Sitecore.SessionProvider.SessionStateSerializer.Serialize(SessionStateStoreData sessionState, Boolean compress)
at Sitecore.SessionProvider.Sql.SqlSessionStateStore.UpdateAndReleaseItem(Guid application, String id, String lockCookie, SessionStateActions action, SessionStateStoreData sessionState)
at Sitecore.SessionProvider.Sql.SqlSessionStateProvider.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData sessionState, Object lockId, Boolean newItem)
at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Nested Exception

Exception: System.Runtime.Serialization.SerializationException
Message: Type 'Feature.FormsExtensions.Fields.Bindings.ListWithBindingsViewModel' in Assembly 'Feature.FormsExtensions, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
Source: mscorlib
at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory)
at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector,
StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArrayMember(WriteObjectInfo objectInfo, NameInfo arrayElemTypeNameInfo, Object data)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteArray(WriteObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer)

It is missing the attributes
CheckBoxListWithBindingsViewModel
DropDownWithBindingsViewModel
ListBoxWithBindingsViewModel
ListWithBindingsViewModel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant