首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web Service >

wcf 如何改上传文件默认值(16384) 非常简单的

2013-10-15 
wcf 怎么改上传文件默认值(16384) 非常简单的错误:The formatter threw an exception while trying to des

wcf 怎么改上传文件默认值(16384) 非常简单的
错误:The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation 'FileUpLoad'. The maximum array length quota (16384) has been exceeded while reading XML data. This quota may be increased by changing the MaxArrayLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 47440.



求一个web.config配置文件 将默认值改为2M那么大。网上有很多但我都配不成功唉。
wcf 如何改上传文件默认值(16384) 非常简单的


希望给个完整的。。
[解决办法]
参考http://www.soaspx.com/dotnet/silverlight/silverlight_20100321_3357.html
[解决办法]
服务端 客户端都要配置
<binding name="ServicesBinding" closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" sendTimeout="00:05:00" bypassProxyOnLocal="false" transactionFlow="true" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
          <readerQuotas maxDepth="64" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384" />

热点排行