Subscribe to Subscribers

Forums » .NET » ASP.NET »

Is there any file size constraint on fileupload control


Posted Date: 29 Aug 2006      Posted By:: Ravi Krishna Kothuru     Member Level: Silver    Member Rank: 0     Points: 2   Responses: 2



in my application i have to upload a file with a size of 5MB. but when iam submitting the page, "page cant be displayed" error was showing. so i tried from 2MB file. when iam uploading 2MB file it was working correctly. from 3MB onward it error "Page cant be displayed error" was coming. so please give me reply as soon as possible.



Responses

#72211    Author: sivavenugopal      Member Level: Silver      Member Rank: 0     Date: 29/Aug/2006   Rating: 2 out of 52 out of 5     Points: 2

See the code once again. the code consists of file size. u can mention the size of the file. so it can upload upto that size oly make it to 5mb.

 
#72218    Author: praveen      Member Level: Gold      Member Rank: 0     Date: 29/Aug/2006   Rating: 2 out of 52 out of 5     Points: 2

hey ravi
there is a limit to the size of the file.the given deafult size is 4MB.but i dont understand y u r getting problem from 3Mb.there is some sort of help i can guide u through.


ASP.NET limits the size of requests (and therefore file uploads) as a precaution against denial-of-service attacks. By default, ASP.NET won't accept requests whose size exceeds 4 MB. You can change that by modifying the maxRequestLength attribute of Machine.config's <httpRuntime> element. The following maxRequestLength attribute expands the permissible request size to 8 MB (8192K):
<httpRuntime ... maxRequestLength="8192" ... />

happy coding


 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : RSS aggregator in Website or Web application...
Previous : Cookie
Return to Discussion Forum
Post New Message
Category:

Related Messages

Awards & Gifts
Talk to Webmaster Tony John
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2013 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.