Error "... was not expected. There was an error generating the XMLdocument"

C

Curious

The same code runs fine on my machine. However, it gets runtime error
on a co-worker's machine. The complete error message is:

System.InvalidOperationException: There was an errpr generating the
XML document.
-->System.InvalidOperationException: The type
JointConsole.PrintGenericFilter was not expected.
Use the XMLInclude or SoapInclude attribute to specify types that are
not known statically.
at
System.Xml.Serialization.XmlSerializationWrite.WriteTypedPrimitive(String
name,
String ns, Object o, Boolean xsiType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterArrayList.Write1_Object
(String n, String ns, Object o, Boolean isNullable, Boolean needType)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterArrayList.Write3_ArrayOfAnyType(Object
o)
--- End of inner exception stacj trace ---
at System.Xml.Serialization.XmlSerialize.serialize(XmlWriter
xmlWriter, Object o,
XmlSerializeNamespaces namespaces, String encodingStyle, String id)

Anyone can tell me what is wrong?
 
M

Mr. Arnold

System.InvalidOperationException: There was an errpr generating the
XML document.
-->System.InvalidOperationException: The type
JointConsole.PrintGenericFilter was not expected.
Use the XMLInclude or SoapInclude attribute to specify types that are
not known statically.

You need to lookup what a XMLInclude or SoapInclude attribute is for and
why you needed to use them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top