Forum Moderators: open

Message Too Old, No Replies

Uploading Via ASP.NET using HtmlInputFile

Connection aborts if file > 3meg

         

Radderz

5:37 pm on Feb 9, 2004 (gmt 0)

10+ Year Member



Hi everyone!

I'm experiencing a problem with uploading a file via a http webform using asp.net.

I am using the HtmlInputFile HtmlControl to capture the file, and save it using the PostedFile.SaveAs function.

This works fine no problems, except when I try to upload a file greater then 3 meg it unhelpfuly shows the 'Page cannot be displayed' error message.

The error with it is (not a dot net error):
10053 - Connection aborted
Internet Security and Acceleration Server

It looks to me as there is a problem with the IIS which is prematurely closing the connection, although I can't be sure.

Any thoughts on how to solve this, or why it's occurring?

Thanx,

Radderz

Radderz

2:42 pm on Feb 10, 2004 (gmt 0)

10+ Year Member



Okay, I have answered my own question..

For reference, there is a default maximum length allowed in dot net of 4 Meg.

This can be changed by altering the 'maxRequestLength' in the machine.config or web.config

Example within <system.web>:
<httpRuntime executionTimeout="900" maxRequestLength="1000000"
useFullyQualifiedRedirectUrl="false" minFreeThreads="8"
minLocalRequestFreeThreads="4" appRequestQueueLimit="100"/>