首页 > Web开发 > 详细

.net 大文件上传注意,修改 IIS 配置

时间:2015-09-29 18:37:32      阅读:225      评论:0      收藏:0      [点我收藏+]

原因

Web 服务器上的请求筛选被配置为拒绝该请求,因为内容长度超过配置的值。

可尝试的操作:确认 applicationhost.config 或 web.config 文件中的 configuration/system.webServer/security/requestFiltering/requestLimits@maxAllowedContentLength 设置。

解决方案

  1. 找到IIS 文件目录 C:\Windows\System32\inetsrv\config

    技术分享

 

  2. 打开文件 applicationHost.config

   修改文件内容 maxAllowedContentLength :可以自己设置,单位是 byte

   <requestFiltering>
              <requestLimits maxAllowedContentLength="40000000" />
  </requestFiltering>

 技术分享

  3.  项目本地调试的时候修改项目属性下的服务器为IIS

  技术分享

 

.net 大文件上传注意,修改 IIS 配置

原文:http://www.cnblogs.com/yougmi/p/4846776.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!