我有一个Windows应用程序,它调用WCF服务来构建特定的URL。客户端配置设置
从Windows应用程序调用的WCF函数接受数组形式的位置细节。
我面临一个问题,当数组大小发送到WCF函数是小(例如10),然后服务返回正确的结果。
但是,当数组大小增加(例如> 200)时,服务返回400错误请求。我不确定数组大小或数组内容是否导致此问题。
我试图改变服务器(服务)端web.config接受最大缓冲区大小。
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IServiceContract" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00"
sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text"
textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None" realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime executionTimeout="90" maxRequestLength="1048576" useFullyQualifiedRedirectUrl="false"
minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" />
</system.web>
我仍然面临同样的问题。
在客户端(这里是Windows应用程序),我们如何设置配置设置,以便客户端能够发送大量数据到服务器端?