Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC - problem when uploading large files

I'm working in MVC and I have view control for uploading document. My control is:

<%: Html.TextBoxFor(model => model.PutDoDatoteke, new { type="file"})%>  

When I upload large file I get "The connection to the server was reset while the page was loading" error. I added

<httpRuntime executionTimeout="3600" maxRequestLength="157286400"  />
<compilation debug="true" targetFramework="4.0">

to my web.config file but i still get the same error. Is there any way to check file size on client side?

like image 478
Cipiripi Avatar asked Oct 15 '25 13:10

Cipiripi


1 Answers

This was solution for my problem : http://weblogs.asp.net/jeffwids/archive/2009/09/24/from-iis6-maxrequestlength-to-iis7-maxallowedcontentlengthfile-specifying-maximum-file-upload-size.aspx

like image 169
Cipiripi Avatar answered Oct 17 '25 11:10

Cipiripi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!