开发者

What is the best and quick way to debug serialization exceptions in asp.net

Serialization exceptions are notorious and often dont have the complete stack trace to tell exactly which complex type is the culprit. I am trying to serialize a very complex type but facing exceptions like below. Can any one tell me to quickly get culprit type. I tried putting [NonSerialized] on types which i suspect . But this is ve开发者_JAVA百科ry laborious process..

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.


AFAIK, none. It cannot be debugged as the code lives in an assembly that is dynamically generated.

However, checking stack trace and inner exceptions usually provides enough information to find the culprit.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜