Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.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
Asp.net mvc 无法序列化会话状态。在';StateServer';和';SQLServer';模式下,ASP.NET将序列化会话状态对象_Asp.net Mvc_Session_Serialization - Fatal编程技术网

Asp.net mvc 无法序列化会话状态。在';StateServer';和';SQLServer';模式下,ASP.NET将序列化会话状态对象

Asp.net mvc 无法序列化会话状态。在';StateServer';和';SQLServer';模式下,ASP.NET将序列化会话状态对象,asp.net-mvc,session,serialization,Asp.net Mvc,Session,Serialization,正如我所描述的,我的会话有问题 我创建了ASPState并配置了我的webconfig 但它给出了这个错误 Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef object

正如我所描述的,我的会话有问题 我创建了ASPState并配置了我的webconfig 但它给出了这个错误

   Unable to serialize the session state. In 'StateServer' 
and 'SQLServer' mode, ASP.NET will serialize the session state objects,
 and as a result non-serializable objects or MarshalByRef objects are not
 permitted. The same restriction applies if similar
 serialization is done by the custom session state store in 'Custom' mode. 
  [SerializationException: Type 'System.ServiceModel.ClientBase1[[Tourism.Plugin.BiletBank.BiletBankSRV.I_Shopping, Tourism.Plugin.BiletBank, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]]' in Assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' is not marked as serializable.]
该类System.ServiceModel.ClientBase`1[[Tourism.Plugin.BiletBank.BiletBankSRV.I_]中给出了异常 我使用了serializable属性

 [System.Serializable()]
    [System.Diagnostics.DebuggerStepThroughAttribute()]
    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    public partial class I_ShoppingClient : System.ServiceModel.ClientBase<Tourism.Plugin.BiletBank.BiletBankSRV.I_Shopping>, Tourism.Plugin.BiletBank.BiletBankSRV.I_Shopping {....
[System.Serializable()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute(“System.ServiceModel”,“4.0.0.0”)]
公共部分类I_ShoppingClient:System.ServiceModel.ClientBase、Tourism.Plugin.BiletBank.BiletBankSRV.I_Shopping{。。。。
编辑注: 如何编辑 .net框架代码。。。
[SerializationException:程序集'System.ServiceModel,Version=4.0.0.0,Culture=4.0.0,Culture=neutral,PublicKeyToken=null'中的类型'System.ServiceModel.ClientBase'1[[,Version=1.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089'未标记为可序列化。]

请注意,它说的是MenuItemModel,而不是MenuModel。@ErikFunkenbusch谢谢你……我更新了我的问题