We are using the WebForms report viewer control on an .aspx page. We are trying to modify our site to use a State Server session state model, so all of our session items need to be serializable.. we've successfully made our objects serializable, but we are running in to a Serialization error on the ReportViewer page, and can't get to the bottom of it, because the error is thrown by external code...
Our report viewer page ends up throwing
Exception:Caught: "Invalid name character in 'List`1'. The '`' character, hexadecimal value 0x60, cannot be included in a name." (System.ArgumentException)
A System.ArgumentException was caught: "Invalid name character in 'List`1'. The '`' character, hexadecimal value 0x60, cannot be included in a name."
Which leads to
A System.Web.HttpException was caught: "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'
None of our code is placing anything in to Session for the Report ... the code works fine for "InProc" session, which leads us to surmise that the Report Viewer control is utilizing Session State somewhere. How can we utilize the Report Viewer control in a Serializable manner?