View Objects in Session of a Running ASP.NET Application

拜拜、爱过 提交于 2019-12-04 18:42:01

Actually your exception tells you exactly what it is: You have a UserControl that is being placed into the Session somewhere and it is not marked as serializable.

---> System.Runtime.Serialization.SerializationException: Type 'System.Web.UI.Control' in Assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.

Update

You can put some code in a page OnLoad (or similar) that simply iterates the session and dumps that out, it's not too difficult:

foreach(var key in Session.Keys)
   Response.Write(String.Format("{0}: {1}<br/>", key, Session[key]);

That's not going to identify the exact code/page but it should give you some search criteria.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!