This is an error that typically comes if you try to serialize a derived object and the serializer does not know of the derived class. There are some good explanations/solutions for this issue:
- http://www.johnsoer.com/blog/?tag=the-type-was-not-expected-use-the-xmlinclude-or-soapinclude-attribute-to-specify-types-that-are-not-known-statically
- http://www.codeproject.com/KB/XML/xmlserializerforunknown.aspx