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.
因此,像this这样的问题提到了查找SerializationException,找出无法序列化的内容,并使其可序列化.听起来很简单……但是当我找到它时,我发现了这个:
[SerializationException: Type ‘Microsoft.Web.Services3.StateManager’
in Assembly ‘Microsoft.Web.Services3,Version=3.0.0.0,
Culture=neutral,PublicKeyToken=31bf3856ad364e35’ is not marked as
serializable.]
这让我感到困惑……听起来它实际上是在试图序列化StateManager ……只是它隐藏了内部的其他内容是StateManager无法序列化吗?如果是这样,有没有办法找出什么?或者,由于某种原因,StateManager是否真的应该可序列化? (我怀疑我没有说清楚这个……抱歉……如果你有疑问,我会尽力回答.)
我还应该注意的一件事是我们使用NCache作为会话存储提供程序,它似乎可能在某种程度上相关.但我不清楚这是如何导致我所看到的.