【发布时间】:2012-12-06 19:02:10
【问题描述】:
我在会话状态中存储一个对象(使用本地会话状态服务器),类 def 是:
[Serializable]
public class ExtendedOAuth2Parameters : OAuth2Parameters
但服务仍在报告:
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.
[SerializationException: Type 'Google.GData.Client.OAuth2Parameters' in Assembly 'Google.GData.Client, Version=2.1.0.0, Culture=neutral, PublicKeyToken=04a59ca9b0273830' is not marked as serializable.]
如何解决?
【问题讨论】:
标签: asp.net serialization session-state