wcf 4.0 中默认对传输数据大小有限制,为65535 字节。如果数据超过此值需要手动进行设置
<basicHttpBinding>
<binding name="BasicHttpBinding_ChaoBiaoKZ" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" maxBufferSize="2147483647">
<readerQuotas maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxDepth="2147483647" maxNameTableCharCount="2147483647"
maxStringContentLength="2147483647" />
</binding>
</basicHttpBinding>
<services>
<service name="CSMS2.Application.ChaoBiao">
<endpoint binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ChaoBiaoKZ"
contract="CSMS2.Application.IChaoBiaoKZ" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
还要注意一点 service节点中 name属性值为wcf文件 .svc所指名称。