如何为每个操作设置maxAllowedContentLength值?
我有一些用于上传文件的操作,每个操作都需要不同的maxAllowedContentLength值.
有意义的是,我们不想使用动作过滤器,因为我们希望在IIS级别过滤此请求.另一方面,动作过滤器是从编码角度来看的最佳解决方案,因为它们在路线之后,所以我路线改变,它继续工作.
在IIS6中我知道我们可以使用< location>用于将maxRequestLength指定到特定位置的标记.
我不知道如何在IIS7上使用这种方法,我不喜欢这种方法,因为url路由是在web.config中手动编码的.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。