WCF:请求实体太大
WCF: request entity too large
我正在上传 26 MB 的 pdf,但在上传 pdf 时出现以下错误
The remote server returned an unexpected response: (413) Request
Entity Too Large.
我正在尝试 upload
的 PDF
我的 WCF web.config
<bindings>
<basicHttpBinding>
<binding maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered"
closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">
<readerQuotas maxDepth="2000000000"
maxStringContentLength="2000000000"
maxArrayLength="2000000000"
maxBytesPerRead="2000000000"
maxNameTableCharCount="2000000000" />
</binding>
</basicHttpBinding>
</bindings>
我的网络应用程序 web.config
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483647" />
</requestFiltering>
</security>
相同的代码在本地运行良好,但当我将这些更改发布并托管到 IIS 中时,出现错误
The remote server returned an unexpected response: (413) Request
Entity Too Large.
我在 Whosebug 上看到了多个问题和答案,但仍然无法理解哪里出了问题
我认为您需要检查服务配置。
我正在上传 26 MB 的 pdf,但在上传 pdf 时出现以下错误
The remote server returned an unexpected response: (413) Request Entity Too Large.
我正在尝试 upload
的 PDF我的 WCF web.config
<bindings>
<basicHttpBinding>
<binding maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Buffered"
closeTimeout="00:10:00" openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00">
<readerQuotas maxDepth="2000000000"
maxStringContentLength="2000000000"
maxArrayLength="2000000000"
maxBytesPerRead="2000000000"
maxNameTableCharCount="2000000000" />
</binding>
</basicHttpBinding>
</bindings>
我的网络应用程序 web.config
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IService" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483647" />
</requestFiltering>
</security>
相同的代码在本地运行良好,但当我将这些更改发布并托管到 IIS 中时,出现错误
The remote server returned an unexpected response: (413) Request Entity Too Large.
我在 Whosebug 上看到了多个问题和答案,但仍然无法理解哪里出了问题
我认为您需要检查服务配置。