Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Files too big for upload ?? 2

Status
Not open for further replies.

N3XuS

Programmer
Mar 1, 2002
339
BE
Started new thread on this , the other one was too messy.
I found the cause of why I was getting:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver]General error Unable to open registry key 'Temporary (volatile) Jet DSN for process 0xa88 Thread 0x794 DBC 0xfd9dff4 Jet'.

/upload.asp, line 46

It seems to happen when I upload a picture above 200kb. On my test server it works because it's fast but uploading to my live server is slower and I suspect that a timeout finds place. Line 46 of upload.asp is biData = Request.BinaryRead(Request.TotalBytes)

the code part where I upload is:

Dim Uploader, File
Set Uploader = New FileUploader
Uploader.Upload()
typeID = Uploader.Form("typeID")
plaatsID = request.QueryString("sub")
Dim uploadsDirVar

uploadsDirVar = Request.ServerVariables("APPL_PHYSICAL_PATH") & "projecten\project" & Request.QueryString("project")
response.write(&quot;<div class=&quot; & chr(34) & &quot;text&quot; & chr(34) & &quot;>&quot;)

If Uploader.Files.Count = 0 Then
Response.Write &quot;Error: File(s) zijn niet geupload<br>&quot;
Response.Write &quot;Contacteer uw webmaster.&quot;
response.Write(&quot;<script language=&quot; & CHR(34) & &quot;javascript&quot; & CHR(34) & &quot;>parent.invoer.verzenden(false);</script>&quot;)
Else
For Each File In Uploader.Files.Items

File.SaveToDisk uploadsDirVar

Response.Write &quot;Verstuurd bestand : &quot; & File.FileName & &quot;<br>&quot;
Response.Write &quot;Grootte : &quot; & File.FileSize & &quot; bytes<br>&quot;
Response.Write &quot;Bestandstype : &quot; & File.ContentType & &quot;<br><br>&quot;

Next
%>
<script language=&quot;javascript&quot;>
parent.invoer.verzenden(false);
parent.invoer.controleer();
</script>
<%
End If

What can be causing this ? and are there any solultions ?
 
Anyone encoutering the same problem, I found out what's wrong. From Question:


--------------------------------------------------------------------------------
Does Pure ASP Upload support uploading large files on Windows 2003 server? I'm getting the following error:
Request object error 'ASP 0104 : 80004005'
Operation not Allowed
/ScriptLibrary/incPureUpload.asp, line 40




Answer:


--------------------------------------------------------------------------------

Yes, Pure ASP Upload supports uploading large files on the Windows 2003 server. However:

IIS6.0 prevent the upload of files more than +200Kb. So you need to make some changes in the default IIS settings first.

Background
For IIS6.0 users, the AspMaxRequestEntityAllowed property specifies the maximum number of bytes allowed in the entity body of an ASP request. If a Content-Length header is present and specifies an amount of data greater than the value of AspMaxRequestEntityAllowed, IIS returns a 403 error response.

This property is related in function to MaxRequestEntityAllowed, but is specific to ASP request. Whereas you might set the MaxRequestEntityAllowed property to 1 MB at the general World Wide Web Publishing Service ( level, you may choose to set AspMaxRequestEntityAllowed to a lower value, if you know that your specific ASP applications handle a smaller amount of data.

Solution
Open your metabase.XML which is located in c:\Windows\System32\Inetsrv find the line &quot;AspMaxRequestEntityAllowed&quot; and change it to &quot;1073741824&quot;. This is 1GB - of course you can enter another value to suite your needs.
 
hi n3xus,

have you got a clue where in iis 5 i could apply the changes to make iis accept larger files (through form/post)? currently the cgi CONTENT_LENGTH var stores 0 when uploading files larger than 150kb.

thanks
 
As far as I know IIS 5.0 doesn't have the standard upload limit set to 150kB. That was a new security policy in IIS 6.0, so if you are using your script local and you installed the server yourself it shouldn't have an upload limit in kb. Don't forget about the time limit as well. try uploading files just a bit bigger than 150 kb and try to push it as far as possible. When you get to the limit like ea 154 kb try uploading slower and see if you can still get to 154 kb. (a few times to be sure.) if you can't get to 150kb then , the cause most likely is a timeout and not a size limit. I never actually solved this problem the decent way as I didn't have access to the settings of the server instead I used an upload module that was provided by the ISP.
 
N3XuS, may I suggest making you post a FAQ?

google.gif
ha.gif
 
is this such a big problem ?
I was just browsing the net and found out it's dependant on different things for different languages.
There 's a variable to be set on the IIS server as I stated before. There's a variable for ASP.NET to override this (didn't test this.) and there's a variable for php in php.ini (located on the server and also not always accessible.) with ini_set("upload_max_filesize", "4M");
ini_set("post_max_size","10M"); if the ini_set() command is enabled. Now looking into the IIS 5.0 - cgi problem. I have no means to test all of this and I'm a sucky writer heh :) It seems to be a too broad problem to put into a single faq anyhow, needs a lot more research.
 
russland try this URL:
talks about upload limit for CGI scripts in both perl and php. It's none server specific though, these are variables set with the scripts, not a setting on the server and there COULD be a setting on the server as well preventing bigger uploads.

<< link to salvation :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top