问题
Whenever I try to upload a sound file IO get the error "The connection to the server was reset while the page was loading.". The sound file is 5.58mb, an .OGG. My server is visual studios 9 (2008). The form uses enctype="multipart/form-data". I have a feeling it may be a filesize limit but I dont know where to change the file length allowed.
How do I fix a "The connection to the server was reset while the page was loading." problem in my code?
回答1:
In the web.config:
<system.web>
<httpRuntime maxRequestLength="1048576" executionTimeout="3600" />
<sessionState timeout="60" />
</system.web>
I've found lot more things you can put in httpruntime at wrox site:
<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" />
来源:https://stackoverflow.com/questions/1067222/cant-upload-sound-files-in-visualstudios-server