Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Serialization Fluent Nhibernate实体列表序列化错误_Serialization_Error Handling_Fluent Nhibernate_Entity - Fatal编程技术网

Serialization Fluent Nhibernate实体列表序列化错误

Serialization Fluent Nhibernate实体列表序列化错误,serialization,error-handling,fluent-nhibernate,entity,Serialization,Error Handling,Fluent Nhibernate,Entity,我试图在asp.net页面的viewstate中保存fluent nhibernate的一些实体\ 实体类已经是具有[Serializable]属性的标记,但我仍然在第页上看到错误: Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'System.Collections.Generic.

我试图在asp.net页面的viewstate中保存fluent nhibernate的一些实体\ 实体类已经是具有[Serializable]属性的标记,但我仍然在第页上看到错误:

Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Error serializing value 'System.Collections.Generic.List`1
这个错误是由nhibernate的代理类引起的吗? 有什么想法吗?谢谢

PS:添加了一些代码

[Serializable]
public class ExcludedGroup : BaseEntity
{
    public virtual int ID { get; set; }
    public virtual string Name { get; set; }
    public virtual bool IsMatch { get; set; }
    public virtual bool CalculatedField { get; set; }
}

public ExcludedGroupMap()
{
    Table("Groups");

    Id(x => x.ID).GeneratedBy.Identity();
    Map(x => x.Name);
    Map(x => x.IsMatch);
    Map(x => x.CalculatedField).Not.Update();
}

错误在基本实体类中。所有类的层次结构都应标记为serializable属性