This is a migrated thread and some comments may be shown as answers.

Serialization Error

3 Answers 21 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Troy
Top achievements
Rank 1
Troy asked on 05 Oct 2011, 12:33 PM
I am using AjaxManager with a farily complex page. It's sometimes tough to reproduce, but I get a serialization error at the end of a request, during the response back to the client after all of my server code has run.  It is within some Telerik code.  The odd thing is that once I do a full page refresh, it doesn't happen again.

Any help you can provide will be greatly appreciated.

3 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 07 Oct 2011, 05:44 AM
Hello Troy,

What is the exact error? can you send a live Url where we can observe the problem?

Best wishes,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
0
Troy
Top achievements
Rank 1
answered on 12 Oct 2011, 04:45 PM
Here's the error:

System.InvalidCastException: Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'System.String'.

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteString(NameInfo memberNameInfo, NameInfo typeNameInfo, Object stringObject)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteKnownValueClass(NameInfo memberNameInfo, NameInfo typeNameInfo, Object data)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMembers(NameInfo memberNameInfo, NameInfo memberTypeNameInfo, Object memberData, WriteObjectInfo objectInfo, NameInfo typeNameInfo, WriteObjectInfo memberObjectInfo)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.WriteMemberSetup(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String memberName, Type memberType, Object memberData, WriteObjectInfo memberObjectInfo)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo, String[] memberNames, Type[] memberTypes, Object[] memberData, WriteObjectInfo[] memberObjectInfos)

   at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Write(WriteObjectInfo objectInfo, NameInfo memberNameInfo, NameInfo typeNameInfo)

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

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

   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)

   at System.Web.UI.ObjectStateFormatter.SerializeValue(SerializerBinaryWriter writer, Object value)
0
Iana Tsolova
Telerik team
answered on 13 Oct 2011, 02:41 PM
Hello Troy,

This seems like a server-side error. So you should be able to replicate in when ajax is disabled. And if you run the project in debug mode, it should break somewhere in the code. Can you check it out?

Best wishes,
Iana Tsolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Ajax
Asked by
Troy
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Troy
Top achievements
Rank 1
Share this question
or