We are running some performance tuning tests on an Time Tracking application. We are running LLBLGen 2.0 (SelfServicing, Two Classes), 2.0 Framework, and C#.
One of the performance tuning tests was to try using typedLists in replace of Prefetch Paths. This produced a tremendous savings in retreival time. We utilize a ServiceFacade, which holds custom classes and properties and serves as a "mapping" layer between the DAL that LLBLGen generates and the UI. The ServiceFacade holds all the getting, updating, inserting, and deleting classes and provides a "friendly" class for the UI developers to interface with. The UI programmers interacts with the ServiceFacade, not the DAL, to create their pages.
Any who...when modifying one of our methods in the ServiceFacade to utilize the new TypedList, it works at times, and at other times it blows up. I am having trouble tracking down the issue at hand. As I step through the code, I get no specific error message that could point me in the right direction. I get the following error consistently on several pages. But it works on others...so is the mix of using Entities/PrefetchPaths and the TypedList causing me issues? Anyway, any information you can provide would be greatly appreciated. Error is below...
Server Error in '/' Application.
Type 'TMSDAL.TypedListClasses.GetAllTmsUsersRow' in Assembly 'TMSDAL, Version=1.0.2820.27157, Culture=neutral, PublicKeyToken=null' 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.Serialization.SerializationException: Type 'TMSDAL.TypedListClasses.GetAllTmsUsersRow' in Assembly 'TMSDAL, Version=1.0.2820.27157, Culture=neutral, PublicKeyToken=null' 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 'TMSDAL.TypedListClasses.GetAllTmsUsersRow' in Assembly 'TMSDAL, Version=1.0.2820.27157, Culture=neutral, PublicKeyToken=null' is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +2271925
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(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +161
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Type objectType, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter) +46
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo) +504
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +489
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +131
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +12
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +2849
[ArgumentException: Error serializing value 'System.Collections.Generic.List1[TmsServiceFacade.MyProjects]' of type 'System.Collections.Generic.List
1[[TmsServiceFacade.MyProjects, TmsServiceFacade, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].']
System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3056
System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +126
System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +52
System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Serialize(Object state) +4
System.Web.UI.Util.SerializeWithAssert(IStateFormatter formatter, Object stateGraph) +37
System.Web.UI.HiddenFieldPageStatePersister.Save() +106
System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +82
System.Web.UI.Page.SaveAllState() +552
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1676
Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET Version:2.0.50727.832