首页 > Web开发 > 详细

MVC3 中上传大文件

时间:2014-10-13 00:17:03      阅读:330      评论:0      收藏:0      [点我收藏+]

MVC3中上传大文件,发现文件超过10M就不能上传。文件上传的限制也改了,仍然不起作用。解决办法如下:

第一步:在web.config中添加:

<system.web>   
  <!-- The request length is in kilobytes, execution timeout is in seconds  -->  
  <httpRuntime maxRequestLength="100240" executionTimeout="500" />
 
</system.web>
第二步:在web.config中添加:
<system.webServer>   
     <security>      
           <requestFiltering>     
   <!-- The content length is in bytes  --> 
                   <requestLimits  maxAllowedContentLength="150485760"/>     
 </requestFiltering>  
  </security>  
</system.webServer>

 

MVC3 中上传大文件

原文:http://www.cnblogs.com/adenwei/p/4021301.html

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