Last post Apr 11, 2012 04:41 AM by mm10
Apr 09, 2012 11:43 PM|jeffrijo|LINK
I have a asp.net 4.0 web application C# using SQL Server Session state. I am trying to call reports from SQL Server Reporting Services via the Reportviewer Control and I get this error:
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.
If I disable session state for the whole web app the report works. Is there a way to get the reportviewer control to work with SQL Server Session state or can I disable session state for the directory that the reports are in?
Apr 11, 2012 04:41 AM|mm10|LINK
You can disable session state for a single page by setting EnableSessionState to false at the top of your markup:
<%@ Page Language="C#" .... EnableSessionState="False" ... %>