精通asp.net的帮忙看看啊

小白小霸王 发布于 2012/12/28 12:46
阅读 159
收藏 0
程序集“WebHr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”中的类型“WebHr.LsWebPublic.TransControl.TransInstanceControl+CheckBlankItems”未标记为可序列化。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.Runtime.Serialization.SerializationException: 程序集“WebHr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”中的类型“WebHr.LsWebPublic.TransControl.TransInstanceControl+CheckBlankItems”未标记为可序列化。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。  

堆栈跟踪:


[SerializationException: 程序集“WebHr, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null”中的类型“WebHr.LsWebPublic.TransControl.TransInstanceControl+CheckBlankItems”未标记为可序列化。]
   System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +7731563
   System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +258
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +111
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +161
   System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +51
   System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +410
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +134
   System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph) +13
   System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +842

[ArgumentException: 序列化类型“WebHr.LsWebPublic.TransControl.TransInstanceControl+CheckBlankItems”的值“WebHr.LsWebPublic.TransControl.TransInstanceControl+CheckBlankItems”时出错。]
   System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value) +3319
   System.Web.UI.ObjectStateFormatter.Serialize(Stream outputStream, Object stateGraph) +110
   System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph) +57
   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() +79
   System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state) +105
   System.Web.UI.Page.SaveAllState() +236
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1099

 

加载中
0
要吃九个橙子
要吃九个橙子

应该是一个类没有标记可序列化 

序列化之后就报错了吧.

[Serializable]  //这样子标记类才能被序列化
public class vv
{
    ....
}

返回顶部
顶部