关于C#中调用接口error in deserializing body of reply message错误 由于C#中默认限制了最大长度,所以在传输过程中如果数据量过大会产生这个错误。简单提高最大值就可以了,又或者在每次新client中输入 1.在每次新client前加入: bind.ReaderQuotas = Xml.XmlDictionaryReaderQuotas.Max 2.在appconfig 或者webconfig中BasicHttpBinding加入 <readerQuotas maxStringContentLength="bignumber"> 3.直接提高最大值 <bindings> <basicHttpBinding> <binding name="BasicBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="999999" maxBufferPoolSize="999999" maxReceivedMessageSize="999999" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="999999" maxStringContentLength="999999" maxArrayLength="999999" maxBytesPerRead="999999" maxNameTableCharCount="999999" /> <security mode="None" /> </binding> </basicHttpBinding> </bindings>