我已阅读了许多关于它的帖子,但我不知道我的web.config会发生什么。WCF:413请求实体太大
这是德的web.config代码:
<system.serviceModel>
<client>
<endpoint binding="basicHttpBinding" bindingConfiguration="NewBinding0"
contract="Service.IService" />
</client>
<bindings>
<basicHttpBinding>
<binding name="NewBinding0" closeTimeout="00:05:00" openTimeout="00:05:00"
sendTimeout="00:05:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</basicHttpBinding>
<webHttpBinding>
<binding name="NewBinding1" maxBufferSize="2147483647" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
</binding>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
我很抱歉,但我不与web.conf文件熟悉。我读过,我必须设置maxReceivedMessageSize,但我已经完成了,并且我收到了同样的错误。
我正在使用Microsoft Service Configuration Editor编辑文件。 我试过用basicHttpBinding和没有webHttpBinding,但不起作用。
每次我调用WCF时,都会收到相同的错误。
在SOAPUI中尝试,当邮件大小小于65537时,它起作用。当邮件大小超过65536时,它不起作用。
Thaks提前。
普约尔
[IIS7 - (413)Request Entity Too Large的可能重复| uploadReadAheadSize](http://stackoverflow.com/questions/10122957/iis7-413-request-entity-too-large-uploadreadaheadsize) – stuartd
您是否在服务器和客户端上都设置了相同的值?他们需要匹配。 –