In this article we are explaining how to upload large
file in asp.net. In previous article we discussed How
to upload file in asp.net. But problem is that when we want to upload large
file more than 4MB using File Upload control then file is not upload and
display an error 'Maximum request length exceeded'. This type of problem is occurring
because The 4MB default is set in machine.config. But you can override it in your
web.config.
Step
1
Go in solution explorer and double click on
'web.config' file.
Step
2
In 'web.config' file and write following code.
<system.web>
<httpRuntime executionTimeout="240" maxRequestLength="20480" />
</system.web>
Step
3
Now run project and try to upload large file.
No comments:
Post a Comment