【发布时间】:2019-04-24 23:47:05
【问题描述】:
当发布可以包含一个或多个文件(作为 base64 字符串)的请求时,我收到以下错误响应:
ERROR 2018-11-22 09:54:18,244 [13] Mvc.ExceptionHandling.AbpExceptionFilter - 远程服务器返回意外响应:(413) 请求实体太大。 System.ServiceModel.ProtocolException:远程服务器返回意外响应:(413)请求实体太大。 在 System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult 结果) 在 System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult 结果) 在 System.ServiceModel.Channels.ServiceChannel.EndCall(字符串操作,对象 [] 输出,IAsyncResult 结果) 在 System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.c__DisplayClass1_0.b__0(IAsyncResult asyncResult) --- 从先前抛出异常的位置结束堆栈跟踪 --- 在...
我已经搜索过如何解决这个问题,但我总是被重定向到 WCF 解决方案。
我已将以下内容添加到我的 WebApi 项目的 web.config 中,但似乎没有什么不同。
<configuration>
<system.webServer>
....
<asp>
<limits maxRequestEntityAllowed="2147483648"/>
</asp>
<serverRuntime uploadReadAheadSize="2147483647" />
</system.webServer>
</configuration>
谁能帮助我或为我指出正确的资源?
【问题讨论】:
-
对于 .Net Core 3.1 看看这个答案:stackoverflow.com/questions/60675202/…
标签: c# asp.net-core asp.net-core-webapi aspnetboilerplate