Uploading files with classic ASP - Cant do larger than 120 KB?

0

This is driving me crazy. We recently migrated over to Amazons EC2 service, and now file uploads (using Motobit Huge ASP Upload) in our application fail for any files larger than 120kb. I know the default limit is 200kb, but its failing for anything larger than 120 with an error number of -2147024893 (0x80070003) with no description/details at all. I cannot find anything in the event viewer or IIS logs to help point me in any direction.

I did go into IIS under the ASP properties for the site in question, and changed the Maximum Requesting Entity Body Limit from 200000 to 400000, and it made no difference at all. I even tried an iisreset, as well as rebooted the server after making the change just to ensure it applied out of hopeless desperation.

I have tried a multitude of different files and file sizes. The most I have been able to upload is a 120KB file. Its not a code issue, as this same code is working on my local box (IIS 7) without issue, and was simply copied over from our old server as-is.

ASP Limits Properties EDIT: I have also tried the following with no results:

set the request filtering settings of Maximum allowed content length to 30000000 (30 Mb).

Manually edited web.config and added requestLimits maxAllowedContentLength="15728640" and httpRuntime maxRequestLength="2147483647"

amazon-web-services
amazon-ec2
asp-classic
iis-8.5
asked on Stack Overflow Mar 30, 2016 by Digital Fusion • edited Mar 31, 2016 by Digital Fusion

1 Answer

1

I hope this can help someone in the future, because I was banging my head against my desk trying to resolve this.

This component has a maximum memory setting of 128K. Any files that are larger than this are not stored in memory, but instead stored in the temp folder. The default temp folder is C:\Windows\Temp.

The culprit was an Application Pool Setting, under advanced settings. 'Load User Profile' was set to true. Resulting in the component trying to use a temp path in C:\Users, which was failing. There are 3 solutions:

  1. Set Load User Profile = False
  2. Assign a temp folder in code (Form.TempPath = "")
  3. Create the folder in C:\Users (use response.write form.CheckRequirements)

For our case, #1 was the perfect solution. #2 would have required edited over 100 files, and #3 would only be needed if you are required to have #1 set to true.

answered on Stack Overflow Apr 1, 2016 by Digital Fusion

User contributions licensed under CC BY-SA 3.0