httpRuntime元素的System.web设置

本文关键字:web 设置 System 元素 httpRuntime | 更新日期: 2023-09-27 18:25:33

我正在尝试上传一个文件,这是我的设置

<system.web>
<compilation debug="true"  />
<httpRuntime  executionTimeout="110"
 maxRequestLength="4096"
 requestLengthDiskThreshold="256"
 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"
/></system.web>

在这里,我将maxRequestLength设置为4MB,但我只能上传500kb。我尝试了多种设置,但无法获得任何解决方案。我该去哪里使它工作?

httpRuntime元素的System.web设置

请查看https://stackoverflow.com/a/41118265/1498669其中详细描述了两个参数(IIS和WCF)(一个以千字节为单位,另一个以字节为单位)。

RCA:当我上传一个文件时,过了一段时间,我正在做一个location.realod()来获取最新数据。它可以很好地处理高达500kb的文件,因为在那段时间里,上传了这么多文件大小,但如果大小更大,它需要时间,在它成功定位之前,调用了realod()。

Solved: used callback and instead of loading full page, just call the getAll method.