用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 可以自己配置