Reputation: 424
I'm having this weird problem right now and after a few searches on the web I couldn't find anything related to it, basically, when I try to send a .TXT file with 14mb via a FileUpload ASP.NET control it does nothing, the page post back when I click on the upload button but the "click" event doesn't fire
the weird thing is that if I try to send a small file, let's say, 100kb the upload works just fine and the event is triggered the way is supposed to
there's no exception and no error at all, the page simply posts back without firing any event, I even changed the maxRequestLength on my web.config still no luck:
<httpRuntime executionTimeout="43200" maxRequestLength="40960"/>
I tried to upload via Internet Explorer 9 and Firefox 12, both with the same odd behavior
I'm testing it on Windows 7 x64 (IIS 7.5) with .NET v3.5 on an ASP.NET application
right now I'm pretty sure it's a file size limitation, I "sliced" the file to 1mb parts and now I can upload it, whenever it goes beyond 1mb it start posting back without firing any event
found the solution, the answer follows below, thanks everyone!
Upvotes: 2
Views: 1118
Reputation: 424
found the problem, I had to change the "c:\Windows\System32\inetsrv\config\applicationHost.config"
there's a tag similar to this one:
<location path="YourWebSite">
<system.webServer>
<serverRuntime maxRequestEntityAllowed="4294967295" uploadReadAheadSize="2147483647" />
</system.webServer>
</location>
I changed both maxRequestEntityAllowed and uploadReadAheadSize to the values above and the file is now being uploaded
thanks everyone!
Upvotes: 2