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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP file upload WIERD problem

Status
Not open for further replies.

BobbyTrebor

Technical User
Oct 31, 2006
3
CA
Windows Servoer 2003 - IIS 6 - Classic ASP file upload.
My students upload an Access database through an ASP page to a folder on the server. Their db is then checked by another ASP.NET application. If there are errors in what they have done, they need to fix the errors and re-upload. This has been working fine for years. One glitch. If the SAME group of students tries to upload too many times within the timeout period (it seems), they get the classic error:

Microsoft VBScript runtime error '800a0046'
Permission denied
/xxxx/xxxxxxx/upload.asp, line 133

Here is line 133:
Code:
Set oFile = oFS.CreateTextFile(sPath & FileName, True)

Don't get me wrong. The process works BUT it won't work repetitively. After a timeout, same group of students can try again.

Any thoughts? Thanks VERY much.
 
It seems to me this is probably caused by two people simultaneously trying to upload a file to the same location - in which case the file will be 'locked' until one upload has finished. Especially if its quite a large file in which case the locking period would be longer..

Nick (Webmaster)

 
Thanks for the quick reply Nick but that can't be it. I am currently testing the app and am the ONLY one uploading anything at the moment.

Further clarifications: The file in question will ALWAYS have the same name. Each group must follow a strict file naming convention.

They are SUPPOSED to Compact & Repair the Access db, so the file size is, in general, <.5MB. Some don't and the file size sometimes exceeds 1MB. I am currently uploading a file of about .3MB as a test.

It would be UNUSUAL for more than one group member to be doing the same thing on the same assignment at the same time. Only one person (the designated leader) is supposed to do the uploading.

When the ASP.NET application ABORTS on an error, it COULD BE that that app is 'holding onto' the Access db and preventing it from being deleted when the students try to upload again. Again though, this isn't CONSISTENT. Sometimes it will throw the error and sometimes not. It seems more of a FREQUENCY thing (like 3 times within the timeout period).

Thanks again Nick.
 
Maybe it is another application that is using the database and locking it (by creating a .ldb file). I am assuming that another web page or application connects to the database once it has been uploaded. Could this be the cause of a sharing violation?

Nick (Webmaster)

 
That's what I was wondering Nick, but I do not see any Access locking files on the server when this occurs. That is logical and I have investigated that... but that ain't it.

Thanks again Nick.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top