【问题标题】:maxArrayLength issue in silverlightSilverlight 中的 maxArrayLength 问题
【发布时间】:2013-02-02 10:20:40
【问题描述】:

我已经阅读了很多关于这个问题的文章很长时间了,但我没有得到它。

服务器端 web.config 文件

service.clientconfig

客户端asp.net web.config

仍然出现以下错误

读取 XML 数据时已超出最大数组长度配额 (16384)。可以通过更改创建 XML 阅读器时使用的 XmlDictionaryReaderQuotas 对象的 MaxArrayLength 属性来增加此配额。

任何帮助..

【问题讨论】:

    标签: c# wcf silverlight


    【解决方案1】:

    你应该使用这个......

    <bindings>
          <basicHttpBinding>
            <binding name="HttpBinding" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00" sendTimeout="00:10:00">
              <readerQuotas maxDepth="700" maxArrayLength="2147483647" maxStringContentLength="2147483647" />
              <security mode="None" />
            </binding>
          </basicHttpBinding>
        </bindings>
    

    【讨论】:

    • 谢谢..如果我保持尺寸 2097152 而不是 2147483647,它对我有用。
    【解决方案2】:

    我将所有尺寸更改为 2097152 而不是 2147483647,它开始工作了。 我已将 Web 配置配置为允许 2MB。但是如果我上传超过 1MB 的文件,它会抛出同样的异常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多