首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

用vs自带上传控件上传小于4m的没有关问题,大于4m的文件一上传就无法显示

2012-01-24 
用vs自带上传控件上传小于4m的没问题,大于4m的文件一上传就无法显示用vs自带上传控件上传小于4m的没问题,

用vs自带上传控件上传小于4m的没问题,大于4m的文件一上传就无法显示
用vs自带上传控件上传小于4m的没问题,大于4m的文件一上传就无法显示
        protected   void   upbtn_Click(object   sender,   EventArgs   e)
        {
                string   FullFileName   =   this.File1.PostedFile.FileName;
                string   fileName=FullFileName.Substring(FullFileName.LastIndexOf( "\\ ")+1);
                this.File1.PostedFile.SaveAs(Server.MapPath( "up ")+ "\\ "+fileName);
        }



[解决办法]
<httpRuntime executionTimeout= "10000 " maxRequestLength= "2048000 " />
web.config里面加上
可以上传200M的了.
[解决办法]
<httpRuntime
executionTimeout= "110 "
maxRequestLength= "4096 "
requestLengthDiskThreshold= "80 "
useFullyQualifiedRedirectUrl= "false "
minFreeThreads= "8 "
minLocalRequestFreeThreads= "4 "
appRequestQueueLimit= "5000 "
enableKernelOutputCache= "true "
enableVersionHeader= "true "
requireRootedSaveASPath= "true "
enable= "true "
shutdownTimeout= "90 "
delayNotificationTimeout= "5 "
waitChangeNotification= "0 "
maxWaitChangeNotification= "0 "
enableHeaderChecking= "true "
sendCacheControlHeader= "true "
apartmentThreading= "false " />
[解决办法]
文件在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG下
[解决办法]
同意楼上,帮顶
[解决办法]
<httpRuntime executionTimeout= "10000 " maxRequestLength= "2048000 " />
web.config里面加上
[解决办法]
文件在C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG下

======

每个 asp.net 应用程序的 web.config 可以自己配置

热点排行