Has anyone had experience uploading large binary files to IIS via asp.net
and the RFC 1867 standard? We are building a web front end to a SQL Server
DB that is going to hold a large amount of images and other media as
BLOB's (we are aware of the performance implications of storing images in
a database this way - we have other needs that will outweigh this
performance penalty). The following code works acceptably for smaller
images (+-5MB tiff files) but is unsuitable for anything else. The server
has 256 mb of ram and uploading any image around 20 mb or more causes IIS
to continuously consume memory until the web appplication fails.
oUploadImage = System.Drawing.Image.FromStream
(ImageFile.PostedFile.InputStream);
oMemoryStream = new MemoryStream();
oUploadImage.Save(oMemoryStream,ImageFormat.Tiff);
byte[] bBufferArray = oMemoryStream.GetBuffer();
Following this, bBufferArray is passed to a SPROC that updates the db
table. The production server will have 1 GB of RAM so it may be able to
accomodate this problem but it seems like there is surely a more efficient
way to move this data from the web client to the SQL server.
Also we have the following entry in Web.config that should accomodate
these large uploads:
<httpRuntime
maxRequestLength="1048576"
executionTimeout="16600"
/>
Any help would be greatly appreciated.