<p>Has anybody got this to actually work? Documentation is non existent on how to enable this feature and I get missing attribute exceptions despite having a 3.5 SP1 project. </p>

[{'answer_id': 63554, 'author': 'Doanair', 'author_id': 4774, 'author_profile': 'https://Stackoverflow.com/users/4774', 'pm_score': 0, 'selected': False, 'text': '<p>There are several serialization options in WCF: Data contract, XML Serialization and and raw data payload. Which of these are you trying to use? From the question, it seems you are trying to use something other than objects decorated with datacontact attributes. Is that what you are asking?</p>\n'}, {'answer_id': 63598, 'author': 'user7375', 'author_id': 7375, 'author_profile': 'https://Stackoverflow.com/users/7375', 'pm_score': 0, 'selected': False, 'text': '<p>Yes, I am attempting to use the attribute free serialization that was announced as part of SP1 (<a href="http://www.pluralsight.com/community/blogs/aaron/archive/2008/05/13/50934.aspx" rel="nofollow noreferrer">http://www.pluralsight.com/community/blogs/aaron/archive/2008/05/13/50934.aspx</a>). Damned if I can get it to work and there\'s no documentation for it.</p>\n'}, {'answer_id': 63788, 'author': 'Doanair', 'author_id': 4774, 'author_profile': 'https://Stackoverflow.com/users/4774', 'pm_score': 1, 'selected': False, 'text': '<p>I got this to work on a test app just fine... </p>\n\n<p>Service Definition:</p>\n\n<pre><code>[ServiceContract]\npublic interface IService1\n{\n\n    [OperationContract]\n    CompositeType GetData(int value);\n\n}\n\n\npublic class CompositeType\n{\n    bool boolValue = true;\n    string stringValue = "Hello ";\n\n    public bool BoolValue\n    {\n        get { return boolValue; }\n        set { boolValue = value; }\n    }\n\n    public string StringValue\n    {\n        get { return stringValue; }\n        set { stringValue = value; }\n    }\n}\n</code></pre>\n\n<p>Service Implementation:</p>\n\n<pre><code>public class Service1 : IService1\n{\n    public CompositeType GetData(int value)\n    {\n        return new CompositeType()\n        {\n            BoolValue = true,\n            StringValue = value.ToString()\n        };\n    }\n\n}\n</code></pre>\n'}, {'answer_id': 63828, 'author': 'user7375', 'author_id': 7375, 'author_profile': 'https://Stackoverflow.com/users/7375', 'pm_score': 0, 'selected': False, 'text': '<p>Possibly my use of abstract base classes is confusing the matter, though I am adding everything into the known types list. </p>\n'}, {'answer_id': 74263, 'author': 'Doanair', 'author_id': 4774, 'author_profile': 'https://Stackoverflow.com/users/4774', 'pm_score': 0, 'selected': False, 'text': '<p>Yes, it could have to do with abstract classes and inheritance. It sometimes can mess with serialization. Also, it could be visibility of the classes and class hierarchy as well if everything is not public.</p>\n'}, {'answer_id': 472236, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': True, 'text': "<p>I found that it doesn't work with internal/private types, but making my type public it worked fine. This means no anonymous types either :(</p>\n\n<p>Using reflector I found the method ClassDataContract.IsNonAttributedTypeValidForSerialization(Type) that seems to make the decision. It's the last line that seems to be the killer, the type must be visible, so no internal/private types allowed :(</p>\n\n<pre><code>internal static bool IsNonAttributedTypeValidForSerialization(Type type)\n{\n    if (type.IsArray)\n    {\n         return false;\n    }\n    if (type.IsEnum)\n    {\n        return false;\n    }\n    if (type.IsGenericParameter)\n    {\n        return false;\n    }\n    if (Globals.TypeOfIXmlSerializable.IsAssignableFrom(type))\n    {\n        return false;\n    }\n    if (type.IsPointer)\n    {\n        return false;\n    }\n    if (type.IsDefined(Globals.TypeOfCollectionDataContractAttribute, false))\n    {\n        return false;\n    }\n    foreach (Type type2 in type.GetInterfaces())\n    {\n        if (CollectionDataContract.IsCollectionInterface(type2))\n        {\n            return false;\n        }\n    }\n    if (type.IsSerializable)\n    {\n        return false;\n    }\n    if (Globals.TypeOfISerializable.IsAssignableFrom(type))\n    {\n        return false;\n    }\n    if (type.IsDefined(Globals.TypeOfDataContractAttribute, false))\n    {\n        return false;\n    }\n    if (type == Globals.TypeOfExtensionDataObject)\n    {\n        return false;\n    }\n    if (type.IsValueType)\n    {\n        return type.IsVisible;\n    }\n    return (type.IsVisible &amp;&amp; (type.GetConstructor(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance, null, Globals.EmptyTypeArray, null) != null));\n</code></pre>\n\n<p>}</p>\n"}]
['https://Stackoverflow.com/questions/63043', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/7375/']