London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Type 'Episerver.Marketing.Connector.Framework.Data.EntityProfile' is not marked as serializable.

Vote:
 

Hi,

I am facing the following problem. After an Episerver form (EPiServer.Forms.Implementation.Elements.FormContainerBlock) on a page is submitted and the page is reloaded, the following exception occurs:

[SerializationException: Type 'Episerver.Marketing.Connector.Framework.Data.EntityProfile' in Assembly 'Episerver.Marketing.Connector, Version=5.3.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.]
   System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +965
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +83
   System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +238
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +194
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +711
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +91
   System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +751
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +217
   System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +2117

[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) +2274
   System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer) +50
   System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer) +758
   System.Web.SessionState.SessionStateUtility.Serialize(SessionStateStoreData item, Stream stream) +291
   System.Web.SessionState.SessionStateUtility.SerializeStoreData(SessionStateStoreData item, Int32 initialStreamSize, Byte[]& buf, Int32& length, Boolean compressionEnabled) +80
   System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +731
   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +832
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +194
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +91

It seems that the cookie saved for tracking the user, based on the filled in form, is causing the issue: "mai_trk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Removing the cookie will make the website work again.

Could you help solving the issue?

Thanks.

#202044
Mar 12, 2019 14:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.