Posts

Showing posts from January, 2018

Error serializing - Exception of type System.Web.HttpUnhandledException was thrown.

Solved: You have to add [Serializable] attribute in the class and also add inherited class if you extend on that class. Why? Because you have created List or Dictionary type of property Inner Exception: System.ArgumentException: Error serializing value 'ModelClass' of type 'ModelClass.' ---> System.Runtime.Serialization.SerializationException: Type 'IMR.Model.Models.Admin.UserInOutLogSearch' in Assembly 'IMR.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' is not marked as serializable.    at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)    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, Strea...