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>