We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SerializationException Relating to Syncfusion.XlsIO.Base DLL

Thread ID:

Created:

Updated:

Platform:

Replies:

93546 Mar 18,2010 08:43 PM Mar 24,2010 05:09 AM ASP.NET Web Forms (Classic) 4
loading
Tags: XlsIO
Calvin Nguyen
Asked On March 18, 2010 08:43 PM

Hi,

I am working on an ASP.NET web app using Visual Studio 2008 and Syncfusion build 5.102.0.51.

Things are fine in my development environment. Things are also good if the web app is deployed in Debug configuration. However, when it is deployed in Release mode, SerializationExceptions appear intermittently, breaking other functionality.

In the Windows event log, the following error can be seen:


"An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 3972

Exception: System.Runtime.Serialization.SerializationException

Message: Unable to find assembly 'Syncfusion.XlsIO.Base, Version=5.102.0.51, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89'.

StackTrace: at System.Runtime.Serialization.Formatters.Binary.BinaryAssemblyInfo.GetAssembly()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.GetType(BinaryAssemblyInfo assemblyInfo, String name)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap..ctor(String objectName, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.ObjectMap.Create(String name, String[] memberNames, BinaryTypeEnum[] binaryTypeEnumA, Object[] typeInformationA, Int32[] memberAssemIds, ObjectReader objectReader, Int32 objectId, BinaryAssemblyInfo assemblyInfo, SizedArray assemIdToAssemblyTable)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryObjectWithMapTyped record)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadObjectWithMapTyped(BinaryHeaderEnum binaryHeaderEnum)
at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
at System.AppDomain.Deserialize(Byte[] blob)
at System.AppDomain.UnmarshalObject(Byte[] blob)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."


Using FUSLOGVW.exe (i.e., Assembly Binding Log Viewer), I can see the problem is that IIS attempts to find Syncfusion.XlsIO.Base in directory C:\windows\system32\inetsrv. It refuses to look in the bin folder of the web app, where the DLL is actually located.

Does anyone know what the problem is?

Thanks,

Calvin

Calvin Nguyen
Replied On March 18, 2010 08:47 PM

I should also mention...

Just to experiment, I copied all Syncfusion DLLs to the folder C:\windows\system32\inetsrv on the web server. To my surprise, when the web app runs, a different but equally inexplicable problem rears its head.


"An unhandled exception occurred and the process was terminated.

Application ID: DefaultDomain

Process ID: 1604

Exception: System.Runtime.Serialization.SerializationException

Message: The constructor to deserialize an object of type 'Syncfusion.XlsIO.ExcelWorkbookNotSavedException' was not found.

StackTrace: at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
at System.AppDomain.Deserialize(Byte[] blob)
at System.AppDomain.UnmarshalObject(Byte[] blob)

InnerException: System.Runtime.Serialization.SerializationException

Message: The constructor to deserialize an object of type 'Syncfusion.XlsIO.ExcelWorkbookNotSavedException' was not found.

StackTrace: at System.Runtime.Serialization.ObjectManager.GetConstructor(Type t, Type[] ctorParams)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp."

Geetha M [Syncfusion]
Replied On March 19, 2010 12:47 AM

Hi Calvin,

Thank you for your interest in Syncfusion products.

I am afraid that I am not able to reproduce the problem. I created a simple sample and it worked for me. Could you please modify it and send back to us so that we can recreate and find the cause of the problem?

http://help.syncfusion.com/samples/XlsIO.Web/5.1.0.51/F93546/F93546.zip

Regards,
Geetha

Calvin Nguyen
Replied On March 19, 2010 01:27 PM

Hi Geetha,

Thank you for providing the sample project.

I have two questions:


1) Can I ask why you placed Syncfusion.XlsIO.Base in the GAC and not just a regular folder?

2) Do you know what this error means or whether it provides any clues relating to my problem? "The constructor to deserialize an object of type 'Syncfusion.XlsIO.ExcelWorkbookNotSavedException' was not found."


Thanks,

Calvin

Geetha M [Syncfusion]
Replied On March 24, 2010 05:09 AM

Hi Calvin,

Sorry for the delay in responding to you.

1) The assemblies were placed inside the bin folder.

2) This error seems to occur if workbook / excelEngine is not properly disposed. Could you please use the following code?

workbook.Close();
excelEngine.ThrowNotSavedOnDestroy = false;
excelEngine.Dispose();

Regards,
Geetha

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;