asp.net-mvc - 例外:超出最大请求长度
问题描述
当我尝试在 MVC 网站上上传超过 4 MB 的文件时,我收到错误最大请求长度超出。
我增加了 maxRequestLength 和 maxAllowedContentLength ,但得到同样的错误
<requestLimits maxAllowedContentLength="1073741824" />
<httpRuntime maxRequestLength="51200" executionTimeout="600"/>
解决方案
试试这个,它在我的项目中工作
<httpRuntime maxRequestLength="1544096" requestValidationMode="2.0" executionTimeout="55590" />
<requestLimits maxAllowedContentLength="1048576000" />
推荐阅读
- sql - 输出本月所有发票
- python - 如何为使用日期时间的导入函数设置时间?
- python - 在 python 中使用 pyqtgraph 绘制立方体
- android - 在 Android 中制作可滚动 UI 的最佳方法
- c++ - MSVC 将非常量左值引用绑定到右值/临时值
- python - 如何终止 tkinter 中的按钮回调方法
- javascript - 打印 1-100 的奇数(JavaScript - 没有额外的条件语句)
- node.js - 如何从响应中获取部分 JSON
- django - 请求表单中的两个字段中的至少一个
- java - 使用 Comparator 对 Java TreeSet 进行排序