Loveboke

人生是一场独自修行的道路!

uploadify上传大文件 http error 404解决方案

第一步:修改uploadify参数

'fileSizeLimit': '0',//单个文件大小,0为无限制,可接受KB,MB,GB等单位的字符串值2

第二步:修改web.config

1 <configuration>
2   <system.web>
3     <compilation debug="true" targetFramework="4.5" />
4     <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间--> 
5     <httpRuntime targetFramework="4.5" maxRequestLength="1073741824" executionTimeout="3600" />
6   </system.web>
7 </configuration>

第三步:添加system.webServer节点

 1 <configuration> 
 2   <system.web> 
 3     <compilation debug="true" targetFramework="4.5" />
 4     <!--maxRequestLength就是文件的最大字符数,最大值不能超过2个G左右,executionTimeout是超时时间--> 
 5     <httpRuntime targetFramework="4.5" maxRequestLength="1073741824" executionTimeout="3600" /> 
 6   </system.web> 
 7   <system.webServer> 
 8     <security>
 9       <requestFiltering>
 10         <!--修改服务器允许最大长度-->
 11         <requestLimits maxAllowedContentLength="1073741824"/>
 12       </requestFiltering>
 13     </security>
 14   </system.webServer>
 15 </configuration>

参考案例 :http://download.csdn.net/detail/sweetsoft/7986983

L最新评论
    还没有评论!

P发布评论