This topic is locked

aspload size limit alternative

3/14/2007 4:09:53 PM
ASPRunnerPro General questions
H
heets author

I have created a site that uploads files to a hosted web server. I am timing out on uploads of files over 200k. I have read about changing the metabase.xml properties to get around this problem but my ISP will not change the property in question. My ISP's support area gave me this response:
What you can actually do other than changing the values in the metabase.xml (which is something that we can not do since this is shared hosting), is to change the size linit in the aspupload script.
In your aspupload script (check to see if you are using aspupload (uploadscript4.asp) there is a section that lets you state the file size in bytes;
<HTML>

<BODY>
<%

Set Upload = Server.CreateObject("Persits.Upload")
' Limit file size to 50000 bytes, throw an exception if file is larger Upload.SetMaxSize 50000, True
You can either specify the size or change it to false. However since the file is larger, the session is set to 90 seconds. So it still might fail. If it does, we would have to change the time out to allow for a longer asp script run time.
Will this solution work and where would I make this change?
Thanks,

Bruce

Sergey Kornilov admin 3/14/2007

Bruce,
200K file should be uploaded in several seconds which means restricting file size won't help you here.
Does it work fine if you post your application to Demo Account?

H
heets author 3/14/2007

The application and the larger upload work fine on the demo server.
Any other ideas other than changing ISP's?

Sergey Kornilov admin 3/14/2007

Besides swicthing you can try to convince your ISP theyhave a problem that MUST be fixed.

Use the sample upload script they offer to prove that any upload larger than 200K fails and it's not related to script timeout.
Sane ISP will fix this fast. In other case you better switch.

H
heets author 3/16/2007

I've been exchanging emails with my hosting company and they have been very responsive.

I tested my upload with a variety of files and discovered that I can upload files up to 200k in size but above that the upload fails.

They insist that uploads up to at least 2mb should work fine. They even went so far as to place a small upload script on my site and when I tested it I was able to upload my larger files.
Their upload script looks like this:

<HTML>

<BODY>
<% Set Upload = Server.CreateObject("Persits.Upload.1")

Count = Upload.SaveVirtual("\tempupload\") %>

<% = Count %> files uploaded.
</BODY>

</HTML>
My script, docs_add.asp uses the WriteToFile command which I understand is also governed by the ASPMaxRequestEntityAllowed parameter. That parameter is obviously not the culprit since the sample upload script works fine. Do you think I need a similar persists statement? Do you have any other suggestions? My script continues to work fine on your demo server.
Bruce

W
webmaster 11/3/2007

Bruce - have you heard back from Sergey since your last reply?

I've been exchanging emails with my hosting company and they have been very responsive.

I tested my upload with a variety of files and discovered that I can upload files up to 200k in size but above that the upload fails.

They insist that uploads up to at least 2mb should work fine. They even went so far as to place a small upload script on my site and when I tested it I was able to upload my larger files.
Their upload script looks like this:

<HTML>

<BODY>
<% Set Upload = Server.CreateObject("Persits.Upload.1")

Count = Upload.SaveVirtual("\tempupload\") %>

<% = Count %> files uploaded.
</BODY>

</HTML>
My script, docs_add.asp uses the WriteToFile command which I understand is also governed by the ASPMaxRequestEntityAllowed parameter. That parameter is obviously not the culprit since the sample upload script works fine. Do you think I need a similar persists statement? Do you have any other suggestions? My script continues to work fine on your demo server.
Bruce

Sergey Kornilov admin 11/4/2007

Here is the article that explains how to configure web server properly:

http://www.webcheatsheet.com/asp/asp_troub...ting.php#permit