This topic is locked

Uploading Problems

7/23/2006 2:21:44 PM
ASPRunnerPro General questions
beblawi author

I frequently need to upload files that are 5-10 MBs in my application.

First, I ran into the Session Timeout Error (ASP 0113) and by browsing thru the forum found that adding Server.ScriptTimeout = 3600 in both commonfunctions.asp and _variables.asp (I put the code at the top after the "<%" element as instructed in the posting(s).
At any rate, now the error doesn't come, and the webpage goes back to the list view (I have an event setup that way from Edit and Add). But when I come to download the file, I get the 412 bytes file (correct filename), which of course refers to the application's inability to find the file in the designated upload directory. I manually checked the designated upload directory and indeed the file(s) I attempted to upload haven't gone up.
I do not get this problem when I upload files less than 3MB roughly.

My question: what can I do to make the uploader work properly with larger files (note that the server side of all this is with my host and not something that I control).
Alternatively, how can I upload the files in my designated upload directory manually and have the link point to the file (I noticed that the hyperlink value on the filename is a long constructed URL and I wouldn't know how to begin fixing that; nothing appears to be stored on the Access DB file itself).
Thanks

Beblawi

Alexey admin 7/24/2006

Hi,
this looks like IIS settings related problem.
Try to increase the script timeout and maximum request size if you use IIS 6.
Here are the articles about increasing timeout:

http://www.microsoft.com/technet/prodtechn...9.mspx?mfr=true

and request size:

http://support.softartisans.com/kbview_900.aspx

beblawi author 7/26/2006

Thanks.

However, as I noted earlier, the server side controls are not on my side.

Is there a script that I can include in the ASP pages that would override IIS setting for example?

If so, what is that code and where should I put it.
Also, note that I don't get an error anymore (once I changed the Server.ScriptTimeout setting to 3600).

What I get now is a failure to upload the full file (this happens for files 4MB and higher), whereby the link for the file is there, but when you come download it you get a 412 byte corrupt file (this appears to be the pattern when you use the uploader to upload a file but the upload fails yet a link is created)... Further, when I check the actual upload directory I see that the file isn't there (further evidence that the error is caused by the link being created with no corresponding file in the upload/download directory)... This whole dynamic now occurs without there being an error message.
As things stand, it appears my options are:

  1. find a solution by adding/editing script in the ASP pages.
  2. have my hosting service change IIS setting (which is not practical in my case)
  3. limit my application to a max of 4MB when it comes to uploading - which doesn't seem to be right either.
    Kindly let me know how I should tackle this issue.

    Thanks again.

Alexey admin 7/27/2006

Beblawi,
there is no way to increase the max request size without modifying IIS configuration.
All I can recommend you is to move to another hosting which allows uploading of large files.