Error "Unable to serialize the session state" when using Aspose GridWeb in ASP.NET

Hello Support,
I downloaded Aspose Cells Gridweb Demo from here.

http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry539977.aspx

It Working fine if you Set Session in “In Process”.

I change the Session to “State Server” instead of “In Proc”.

I got the attached 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.
”.

Please advise me.

Thanks

Hi Patrick,


Thank you for contacting Aspose support.

We have evaluated your presented scenario while using the latest version of Aspose.Cells.GridWeb 8.3.0, and are able to replicate the error as stated in your original post. However, the stack trace is different, this probably due to the reason that the demo application that you have downloaded from Aspose download section is using older revision of the Aspose.Cells.GridWeb component.

Here is the stack trace we have received.


[SerializationException: Type ‘Aspose.Cells.GridWeb.Data.GridWorkbook’ in Assembly ‘Aspose.Cells.GridWeb, Version=8.3.0.0, Culture=neutral, PublicKeyToken=699ccf88ff76f11a’ is not marked as serializable.]
System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type) +10751795
System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context) +230
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo() +121
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +182
System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder) +51
System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck) +540
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck) +131
System.Web.Util.AltSerialization.WriteValueToStream(Object value, BinaryWriter writer) +1666


[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) +1754
System.Web.SessionState.SessionStateItemCollection.WriteValueToStreamWithAssert(Object value, BinaryWriter writer) +34
System.Web.SessionState.SessionStateItemCollection.Serialize(BinaryWriter writer) +628
System.Web.SessionState.SessionStateUtility.Serialize(SessionStateStoreData item, Stream stream) +240
System.Web.SessionState.SessionStateUtility.SerializeStoreData(SessionStateStoreData item, Int32 initialStreamSize, Byte[]& buf, Int32& length, Boolean compressionEnabled) +62
System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +111
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +565
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +136
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

We have logged this incident in our bug tracking system under the ticket CELLSNET-43185 for further investigation. Please spare us some time to isolate the problem cause on our end. In the meanwhile, we will keep you posted with updates in this regard.

Hi Patrick,


This is to update you regarding the ticket logged earlier as CELLSNET-43185 in our bug tracking system. Unfortunately, the Aspose.Cells.GridWeb component currently does not support the Serialization that is why changing the Session State to StateServer in the configuration file causes the aforesaid exception. We will provide the serialization support for the Aspose.Cells.GridWeb component with future releases of Aspose.Cells for .NET API, and will inform you once we have made significant progress towards implementing the said feature.

We are sorry for the inconvenience caused to you.

Hi,

I’m having the same problem as Patrick.
Has there been any progress made in addressing this?

Thanks

Jim

Hi Jim,

Thanks for your posting and using Aspose.Cells for GridWeb.

Aspose.Cells
currently does not support serialization, so we are afraid, this issue
cannot be fixed. However, this issue is open. If we will have any further update
for you, we will let you know asap.

Hi Shakeel Faiz,
Did you fixed the “CELLSNET-43185”?

Please let us know.

Thanks

Hi,

Thanks for your posting and considering Aspose.Cells.

We are afraid, there is no update for you regarding this issue at this moment. However we have logged your comment in our database against this issue and requested the product team to provide some ETA or update for this issue. Once, there is some news for you, we will share it with you asap.

Hi Patrick,


Please note, the issue logged earlier as CELLSNET-43185 is quite complex, however, we will try our best to share the fix within next two weeks. As soon as the fix is ready for your testing, we will notify you here in reference to the aforementioned ticket.

Hi Patrick,


This is to update you that we have fixed the problem logged earlier as CELLSNET-43185. We will shortly provide the fix here after ensuring the quality of the build and incorporating other enhancements.

Thanks Babar Raza.

Waiting for the new dll :).

The issues you have found earlier (filed as CELLSNET-43185) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

I have downloaded the latest 8.6.2 version with the fix but still have the serialization issue?

Besides that; i can’t find the .enablesession property on the gridweb control as stated in

Please explain.

Hi Vincent,


Thank you for writing back.

Please provide more details on what problem are you facing during the serialization of GridWeb component. It would be appropriate that you should submit a standalone sample application along with complete stack trace (if facing any exception). We will look into the matter to assist you further.

Regarding the GridWeb.EnableSession property, it was removed from the public API on the grounds that it was not being internally used. We are already in discussion with the product team on this matter, and we have attached the appropriate ticket CELLSNET-43948 to this thread for notification purposes.

Attached a sample project. Fairly easy; just create a new project, define the gridweb control combined with ‘stateserver’ in the web.config.

Hi Vincent,


Thank you for the sample application.

Please note, the reason for asking you to provide the sample application and stack trace is to replicate the same problem on our end while using the latest revision of the component at time. Anyway, I have tested your project on my side by starting the ASP .NET State Service, and I am getting the exception as mentioned in the very first post of this thread, while compiled against Aspose.Cells.GridWeb 8.6.2. I have logged this incident in our bug tracking system as CELLSNET-44123 for further investigation, however, we need you to confirm that you are experiencing the same problem. Please review the attached snapshot for complete stack trace.

Yes, confirmed

Hi,


Thank you for the confirmation. We will keep you posted with updates in this regard.

Hi Babar,

I still have the Same problem If I run through Master Page. If I run without Master page, then its working fine.
I think still have problem in Aspose Cells Grid Web only.

Please confirm.

Thanks

Hi Patrick,


You are correct, as we are able to replicate the exception from your original post while using the latest revision of the Aspose.Cells.GridWeb 8.6.2. The corresponding ticket Id is CELLSNET-44123, which appears to be marked resolved by the product team. We are currently waiting for the next build of the component to retest the scenario. As soon as the next revision is available for your testing, we will notify you here along with the download link and tips for your reference.

Hi,


Please try the latest version of Aspose.Cells.GridWeb 8.6.2.6 (attached) against the problem logged earlier as CELLSNET-44123 and let us know of you feedback.