报错:服务器未提供有意义的回复;这可能是由协定不匹配、会话过早关闭或内部服务器错误引起的。
 可能原因:
 
 1、WCF中不允许在协议中定义一个类型而传输其子类型. 除非在该类型上定义了[KnownType(typeof(子类型))]
 
 2、WCF传输List<object>时序列化问题
 
 WCF传输List集合时,在序列化时是有大小限制的,默认的可序列化的集合长度是65536,如果List的大小超出这个值就需要更改了配置了,在服务器端的behavior配
置中增加一行配置
 
<behavior name="WCFService.Behavior">
           <serviceMetadata/>
           <serviceDebug includeExceptionDetailInFaults="false" />
           <dataContractSerializer maxItemsInObjectGraph="6553600"/>
 </behavior>
 并且在对应的binding配置中添加readerQuotas节点配置
   <binding name="BasicWsHttpBinding">
           <reliableSession enabled="true" />
           <security mode="None">
             <transport clientCredentialType="None" />
             <message clientCredentialType="None" />
           </security>
           <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
         </binding>
                                                                                                                             
                                                                                                                               --转自
