Error: Unable to serialize the session state

Posted by: ogoldes on 3 August 2017, 3:55 pm EST

  • Posted 3 August 2017, 3:55 pm EST

    Hello, I just bought Analysis. When I try to run my web app using it, I get the message



    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"



    SerializationException: Type 'DataDynamics.Analysis.Web.HandlerCommands.DataManager' in Assembly 'DataDynamics.Analysis.Web, Version=1.0.912.0, Culture=neutral, PublicKeyToken=d557f2f30a260da2' is not marked as serializable.]





    However, my application MUST run un SQLServer mode. Pls help
  • Replied 3 August 2017, 3:55 pm EST

    Hello, could you give me an approximate time frame for the solution? I need to know if I can count on having it in the course of the next two weeks. Thanks
  • Replied 3 August 2017, 3:55 pm EST

    Hello, could you reproduce the error?

    Regards
  • Replied 3 August 2017, 3:55 pm EST

    Hello,

    I am not sure if this problem is related to Analysis. Make sure you are not trying to store non-serializable objects in SQL. Also take a look at this link. Please share the code where you get this exception with the complete stack trace.

    Regards,
    Aashish
  • Replied 3 August 2017, 3:55 pm EST

    I will have the team investigate this on Monday.  Once they provide an estimate I will let you know.

    Thanks,

    James
  • Replied 3 August 2017, 3:55 pm EST

    Hello,

    Thank you for the additional information. I was able to replicate this issue. I have opened Case 147054 for our developers to look into this issue. I have added your email address to the notification list.
    You will be notified once this is resolved.

    Regards,
    Aashish
  • Replied 3 August 2017, 3:55 pm EST

    ASPX code is attached


    Stack trace follows, please see first line


    The app has about 100 pages, is running ok,
    nothing is explicitely saved in the session in this page.
    Setting session to InProc makes the problem dissappear




    [SerializationException: Type 'DataDynamics.Analysis.Web.HandlerCommands.DataManager' in Assembly 'DataDynamics.Analysis.Web, Version=1.0.912.0, Culture=neutral, PublicKeyToken=d557f2f30a260da2' is not marked as serializable.]

    System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +7736171

    System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +258

    System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +111

    System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +161

    System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter) +51

    System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +410

    System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +134

    System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1577



    [HttpException (0x80004005): 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.]

    System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1662

    System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer) +34

    System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer) +606

    System.Web.SessionState.SessionStateUtility.Serialize(SessionStateStoreData item, Stream stream) +239

    System.Web.SessionState.SessionStateUtility.SerializeStoreData(SessionStateStoreData item, Int32 initialStreamSize, Byte[]& buf, Int32& length) +72

    System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +116

    System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +560

    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68

    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75








    2010/06/ranalisis1.aspx.txt
  • Replied 3 August 2017, 3:55 pm EST

    Aashish's reply should have stated that this issue does not exist in the new Silverlight control that is available in the new 2.0 beta. Since this control provides a better user experience, better performance, and is easier for us to maintain we are recommending that it be used over the ASP.NET server control.



    The issue you experienced is still present in the ASP.NET server control and I have no estimate on when it will be fixed.



    James
  • Replied 3 August 2017, 3:55 pm EST

    Hi,

    We do not have an estimate at this time.  The simple solution of just marking the various objects as Serializable resulted in an unacceptable performance degradation.  In order to fix this we will need to redesign the way that data is being stored on the server.

    James
  • Replied 3 August 2017, 3:55 pm EST

    ogoldes,

    Could you please try to use our new version of DDA (ActiveAnalysis) in your environment as our developers have made some changes to resolve the issue you faced. Here is the link to download the latest interim build of ActiveAnalysis.
    Looking for your feedback.

    Regards,
    Aashish
  • Replied 3 August 2017, 3:55 pm EST

    Hello, do you have an estimate for thos?

    Also, is this fixed in version 2.0 beta?

    Regards!
  • Replied 3 August 2017, 3:55 pm EST

    Hello,

    This case is assigned to our development team. Please allow us some more time to give you any details about its status.

    Regards,
    Aashish
  • Replied 3 August 2017, 3:55 pm EST

    OK, but you realize this prevents the use of DDA in server farm environments..
  • Replied 3 August 2017, 3:55 pm EST

    ogoldes,

    There is no VS 2008 Silverlight samples for ActiveAnalysis because Silverlight ActiveAnalysis component is only supported in VS 2010 (you need Silverlight 4 which is only available in VS 2010). Sorry if it is not clear from the current ActiveAnalysis documentation.

    Thank you,
    Andrey T.

  • Replied 3 August 2017, 3:55 pm EST

    Hello, I posted this in the beta forum but got no answer..it is the follow up of this thread, we migrated to 2010, intalled silverlight 4 but...



    We have a aspx project that uses DDA from an RD data source. The schema and query are loaded from a database. It works ok in DDA.

    Now we want to change to the Silverlight version. We built a separate Silverlight project in the same solution similar to the samples.

    However we cannot find the way to pass schema and query data from ASPX to the Silverlight project where the control is placed. In all samples, all info is containded in the silverlight project.



    Any help will be appreciated







  • Replied 3 August 2017, 3:55 pm EST

    Hi,



    To use the ActiveAnalysis Silverlight control you need to first create a Silverlight application.



    Then you can embed that application into your ASPX just as you would a flash object.



    We ship a couple sample applications with the product that are Silverlight versions of the Viewer and Sample Gallery apps. The page we display the application on only contains the application, but you could put other content around it.



    James
  • Replied 3 August 2017, 3:55 pm EST

    Can I use the Silverlight control in a ASPX web app?
  • Replied 3 August 2017, 3:55 pm EST

    OK, I will try it. Could I somehow get a vs2008 version of the sample solutions?
  • Replied 3 August 2017, 3:55 pm EST

    Hello, how do I use the new silverlight control? Can I just replace the aspx version 1. control? I have not used any silverlight control yet
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels