0
我创建了一个简单的空asp.net网站,并添加了wcf服务来将图像插入数据库。 ,我得到最大阵列配额的错误。我改变了我的客户端配置文件,并增加了最大数组长度的限制。但仍然得到相同的错误。我也跟着这Maximum array length quota,但我不明白,因为我是新手到视觉工作室。请帮我找到这个错误。最大阵列达到wcf服务的配额(16384)
这里是客户端的app.config文件。
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0,Profile=Client" />
</startup>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_Iupload" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="5242880" maxArrayLength="2147483646"
maxBytesPerRead="4096" maxNameTableCharCount="5242880" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:1028/WebSite8/upload.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_Iupload"
contract="UploadRef.Iupload" name="BasicHttpBinding_Iupload" />
</client>
</system.serviceModel>
</configuration>
和网站的配置文件
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="cst" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Admin\My Documents\Visual Studio 2010\WebSites\WebSite8\App_Data\Hello.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True" />
</connectionStrings>
<system.web>
<compilation debug="false" strict="false" explicit="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
</configuration>