我已閱讀了許多關於它的帖子,但我不知道我的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
您是否在服務器和客戶端上都設置了相同的值?他們需要匹配。 –