System.NullReferenceException:“未将对象引用设置到对象的实例。是就因为Session在记录到服务器时,没有添加 IRequiresSessionState 所以运行时回报警,
解决错误就是在最上方的头部添加IRequiresSessionState,并在引用using System.Web.SessionState;即可。
System.NullReferenceException:“未将对象引用设置到对象的实例。是就因为Session在记录到服务器时,没有添加 IRequiresSessionState 所以运行时回报警,
解决错误就是在最上方的头部添加IRequiresSessionState,并在引用using System.Web.SessionState;即可。