title: C# WCF Passing Dictionary<string, object> parameter
body: <p>I am try send Dictionary to WCF service. However if the objcte type is Array or List, it will show me the error " There was an error while trying to serialize parameter......."</p>
  
  <blockquote>
    <p>There was an error while trying to serialize parameter
    <a href="http://tempuri.org/:str" rel="nofollow noreferrer">http://tempuri.org/:str</a>. The InnerException message was 'Type
    'System.String[]' with data contract name
    'ArrayOfstring:<a href="http://schemas.microsoft.com/2003/10/Serialization/Arrays" rel="nofollow noreferrer">http://schemas.microsoft.com/2003/10/Serialization/Arrays</a>'
    is not expected. Add any types not known statically to the list of
    known types - for example, by using the KnownTypeAttribute attribute
    or by adding them to the list of known types passed to
    DataContractSerializer.'.  Please see InnerException for more details.</p>
  </blockquote>
  
  <p>This is my WCF Service:</p>
  
  <pre><code>[OperationContract]
  int PDFImport(string server, 
                string repo, 
                string username, 
                string password, 
                string templateName, 
                string entryName, 
                byte[] image, 
                Dictionary&lt;string, Object&gt; value, 
                string entryPath = @"\1. Incoming", 
                string volume = "DEFAULT");
  </code></pre>
  
  <p>Also try to adding some ServiceKnowType Attributes, but still not working</p>
  
  <pre><code>[ServiceContract]
  [ServiceKnownType(typeof(Dictionary&lt;string, string&gt;))]
  [ServiceKnownType(typeof(Dictionary&lt;string, object&gt;))]
  [ServiceKnownType(typeof(Dictionary&lt;string, List&lt;string&gt;&gt;))]
  [ServiceKnownType(typeof(List&lt;Dictionary&lt;string, List&lt;string&gt;&gt;&gt;))]
  </code></pre>
  
  <p>Please help me out. Thanks in advance.</p>