FileUpload上传文件过大出错
<DIV>上传文件时出现:</DIV><DIV> <BR> System.Web.HttpRequest.GetEntireRawContent() +895 <BR> System.Web.HttpRequest.GetMultipartContent() <BR> System.Web.HttpRequest.FillInFormCollection() +256 <BR> System.Web.HttpRequest.get_Form() +50 <BR> System.Web.UI.Page.GetCollectionBasedOnMethod() +70 <BR> System.Web.UI.Page.DeterminePostBackMode() +47 <BR> System.Web.UI.Page.ProcessRequestMain() +42 <BR>类似的东西。</DIV>
<DIV> </DIV>
<DIV>与web.config中的配置有关。</DIV>
<DIV> </DIV>
<DIV>添加或更改</DIV>
<DIV><httpRuntime maxRequestLength="524288000" useFullyQualifiedRedirectUrl = "true" executionTimeout="600" /></DIV>
<DIV>问题解决,好像默认文件大小4M,直接来个500M的。</DIV>
<DIV> </DIV>
<DIV>这里的executionTimeout是文件上传过程的时间,以秒为单位,这里限制600秒,超过时间而文件仍然没有上传完毕,则上传失败,默认是110秒,maxRequestLength是上传文件的大小,以KB为单位,默认值为 4096 (4 MB)。</DIV>
<DIV>其中httpRuntime的语法为:</DIV>
<DIV> </DIV>
<DIV><httpRuntime<BR> executionTimeout = "HH:MM:SS" <BR> maxRequestLength = "number" <BR> requestLengthDiskThreshold = "number" <BR> useFullyQualifiedRedirectUrl = "" <BR> minFreeThreads = "number" <BR> minLocalRequestFreeThreads = "number" <BR> appRequestQueueLimit = "number"<BR> enableKernelOutputCache = "" <BR> enableVersionHeader = "" <BR> apartmentThreading = ""<BR> requireRootedSaveAsPath = ""<BR> enable = "" <BR> sendCacheControlHeader = "" <BR> shutdownTimeout = "HH:MM:SS"<BR> delayNotificationTimeout = "HH:MM:SS"<BR> waitChangeNotification = "number" <BR> maxWaitChangeNotification = "number" <BR> enableHeaderChecking = "" <BR>/></DIV>
<DIV><BR>位置在system.web标签内,可参考</DIV>
<DIV><A href="http://blogold.chinaunix.net/u/2244/showart.php?id=2546686">http://blogold.chinaunix.net/u/2244/showart.php?id=2546686</A></DIV>
<DIV></DIV>
页:
[1]