无法序列化会话状态。在“StateServer”或“SQLServer”模式下,ASP.NET 将序列化会话状态对象,因此不允许使用无法序列化的对象或 MarshalByRef 对象。如果自定义会话状态存储在“Custom”模式下执行了类似的序列化,则适用同样的限制。

 

在MODEL 类中加入  [Serializable] 如下

 [Serializable]
    public class User
    {

     }

相关文章:

  • 2021-07-31
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-19
  • 2021-11-08
  • 2022-01-07
  • 2021-04-15
  • 2021-10-21
  • 2022-01-19
相关资源
相似解决方案