Increase Image - File Uploads to 100Mb

Tips submitted by ASP.NET Maker users

Increase Image - File Uploads to 100Mb

Postby xgis » Sat Nov 09, 2013 8:17 pm

Steps to implement uploads to 100Mb within IIS7.x-IIS8.5(Untested):

Successfully Upload 26Mb 32Bit 600DPI JPG and failed to re-sample: Final Size 25.6Mb: Time Taken on localhost 15 sec
Successfully Upload 41Mb TIF and re-sampled to to 987KB with High Quality: Time Taken on localhost 5 sec
Successfully Upload 94.5Mb TIF and re-sampled to to 1.52Mb with High Quality: Time Taken on localhost 12 sec

Issues to be resolved include failed re-sampling of JPG.

ANM10 Project: Change ASP.NET | General Options (Tab) | File Upload (Tab) | Max file size (bytes) textbox value to '104857600' which = 100Mb

The following changes will be made to the template web.config. It is important to note this will be the same for all subsequent projects you generate.
Locate your template in the default folder: C:\Program Files (x86)\ASP.NET Maker 10\template\aspx102.zip
Back this file up before you proceed.

If you are using Windows 7-8.1 you will need to transfer the file to an editable location if you have UAC turned on or tight security.
I just transfer it to the desktop. Drag the web.config to the desktop also. Open it in your text editor. Navigate to the end of the file and make the following changes or just replace what is there with this code. Do not make any mistakes!

<httpRuntime maxRequestLength="102400" maxQueryStringLength="4096"<!--## if (PROJ.ServerScriptTimeout > 0) { ##--> executionTimeout="<!--##=PROJ.ServerScriptTimeout##-->"<!--## } ##--> />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="4096" maxAllowedContentLength="100000000"/>
</requestFiltering>
</security>
</system.webServer>

Drag the web.config back to the aspx102.zip template file. Overwrite existing.
Transfer the template zip back to its original location in the ANM10 installation location.

Generate your project. When request to overwrite the template, click the "Overwrite" button.
Run some tests...
If you are hard pressed to find 100mb images... head over to the NASA website for some satellite imagery...
xgis
 
Posts: 87
Joined: Thu Jan 17, 2013 10:40 pm

Maximum File Uploads set to 2Gb

Postby xgis » Thu Dec 19, 2013 4:21 am

The following Web.Config section of the ANM10 template is required to enable uploads to 2Gb.
This has been tested for concurrent uploading and resampling 2 X of 100mb TIF satellite images and works fine.
"maxRequestLength" is what controls the maximum size during an upload event eg multiple large images or files at once.
This change will be permanent for all subsequent projects generated with this template;

<httpRuntime maxRequestLength="2097151" maxQueryStringLength="4096"<!--## if (PROJ.ServerScriptTimeout > 0) { ##--> executionTimeout="<!--##=PROJ.ServerScriptTimeout##-->"<!--## } ##--> />
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="4096" maxAllowedContentLength="2147483648"/>
</requestFiltering>
</security>
</system.webServer>
xgis
 
Posts: 87
Joined: Thu Jan 17, 2013 10:40 pm


Return to User Submited Tips (ASP.NET Maker)