Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/262.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# silverlight中的maxArrayLength问题_C#_Wcf_Silverlight - Fatal编程技术网

C# silverlight中的maxArrayLength问题

C# silverlight中的maxArrayLength问题,c#,wcf,silverlight,C#,Wcf,Silverlight,我已经阅读了很多关于这个问题的文章很长时间了,但我还没有让它起作用 服务器端web.config文件 service.clientconfig 客户端asp.net web.config 仍在获取以下错误 读取XML数据时已超过最大数组长度配额(16384)。可以通过更改创建XML读取器时使用的XmlDictionaryReaderQuotas对象的MaxArrayLength属性来增加此配额 任何帮助。您应该使用此 <bindings> <basicHttp

我已经阅读了很多关于这个问题的文章很长时间了,但我还没有让它起作用

服务器端web.config文件

service.clientconfig

客户端asp.net web.config

仍在获取以下错误

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


任何帮助。

您应该使用此

<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>

我将所有尺寸从2147483647改为2097152,它开始工作。
我已经配置了允许2MB的web配置。但是,如果我上传的文件超过1MB,则会引发相同的异常。

谢谢。如果我保留大小2097152而不是2147483647,则对我有效。