Tom Knowlton
asked on
Serialization problem
Type 'System.Web.UI.Control' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a' is not marked as serializable.
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.Runtime.Serializati on.Seriali zationExce ption: Type 'System.Web.UI.Control' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a' is not marked as serializable.
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 'System.Web.UI.Control' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a' is not marked as serializable.]
System.Runtime.Serializati on.Formatt erServices .InternalG etSerializ ableMember s(RuntimeT ype type) +7731563
System.Runtime.Serializati on.Formatt erServices .GetSerial izableMemb ers(Type type, StreamingContext context) +258
System.Runtime.Serializati on.Formatt ers.Binary .WriteObje ctInfo.Ini tMemberInf o() +111
System.Runtime.Serializati on.Formatt ers.Binary .WriteObje ctInfo.Ini tSerialize (Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +283
System.Runtime.Serializati on.Formatt ers.Binary .WriteObje ctInfo.Ser ialize(Typ e objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +45
System.Runtime.Serializati on.Formatt ers.Binary .ObjectWri ter.WriteA rray(Write ObjectInfo objectInfo, NameInfo memberNameInfo, WriteObjectInfo memberObjectInfo) +178
System.Runtime.Serializati on.Formatt ers.Binary .ObjectWri ter.Write( WriteObjec tInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +7629304
System.Runtime.Serializati on.Formatt ers.Binary .ObjectWri ter.Serial ize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +461
System.Runtime.Serializati on.Formatt ers.Binary .BinaryFor matter.Ser ialize(Str eam serializationStream, Object graph, Header[] headers, Boolean fCheck) +134
System.Runtime.Serializati on.Formatt ers.Binary .BinaryFor matter.Ser ialize(Str eam serializationStream, Object graph) +13
System.Web.UI.ObjectStateF ormatter.S erializeVa lue(Serial izerBinary Writer writer, Object value) +842
[ArgumentException: Error serializing value 'System.Collections.Object Model.Coll ection`1[S ystem.Web. UI.Control ]' of type 'System.Collections.Object Model.Coll ection`1[[ System.Web .UI.Contro l, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d 50a3a]].']
System.Web.UI.ObjectStateF ormatter.S erializeVa lue(Serial izerBinary Writer writer, Object value) +3319
System.Web.UI.ObjectStateF ormatter.S erialize(S tream outputStream, Object stateGraph) +110
System.Web.UI.ObjectStateF ormatter.S erialize(O bject stateGraph) +57
System.Web.UI.ObjectStateF ormatter.S ystem.Web. UI.IStateF ormatter.S erialize(O bject state) +4
System.Web.UI.Util.Seriali zeWithAsse rt(IStateF ormatter formatter, Object stateGraph) +37
System.Web.UI.HiddenFieldP ageStatePe rsister.Sa ve() +79
System.Web.UI.Page.SavePag eStateToPe rsistenceM edium(Obje ct state) +105
System.Web.UI.Page.SaveAll State() +236
System.Web.UI.Page.Process RequestMai n(Boolean includeStagesBeforeAsyncPo int, Boolean includeStagesAfterAsyncPoi nt) +1099
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.Runtime.Serializati
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 'System.Web.UI.Control' in Assembly 'System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Runtime.Serializati
System.Web.UI.ObjectStateF
[ArgumentException: Error serializing value 'System.Collections.Object
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.ObjectStateF
System.Web.UI.Util.Seriali
System.Web.UI.HiddenFieldP
System.Web.UI.Page.SavePag
System.Web.UI.Page.SaveAll
System.Web.UI.Page.Process
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The core problem is as you said.... Controls are not setup to be serialized.