问题
Possible Duplicate:
How to increase the max upload file size in ASP.NET?
i m trying to validate an uploaded content uploaded by user, it works fine if we upload content lesser than 2 MB's, but if we upload content more than 2MB's, withour undergoing any process, we get an error "Connection is reset."
is there and why to increase the limit in asp.net web.config file?
回答1:
If you are trying to upload a file, set this to Web.Config under system.web section
<httpRuntime maxRequestLength="51200" executionTimeout="3600" />
where maxRequestLength is the file size limit in KB and executionTimeout is the timeout in seconds. Set this value as per the requirement.
回答2:
add this to your web.config:
<configuration>
<system.web>
<httpRuntime maxRequestLength="xxx" />
</system.web>
</configuration>
回答3:
You can control the max upload size in asp.net by editing the maxRequestLength attribute in the web.config
How to increase the max upload file size in ASP.NET?
来源:https://stackoverflow.com/questions/7804622/how-to-upload-content-more-than-2-mbs-on-website-created-using-asp-net-4-0