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

Unable to kill file when accessed simulteneusly

Status
Not open for further replies.

level1

Programmer
Apr 16, 2002
60
GB
Hello people.


Im doing a WEB type file manager, using the file system object, IIS, ASP and SQL97.

All functions are working fine. Although the system can also handle HTML files.

The problem i have is that every time im trying to Delete an HTML file that is been accessed by other users at same time i get the following error:

Microsoft VBScript runtime error '800a0046'
Permission denied

/pdh/concept_admin2.asp, line 53

line 53 is the delete command as follows:

fs.DeleteFile request("fullpathurl" & filedetails) & file_conv,true

I need to be able to delete a file no matter if somebody else is vewing it.

Also you get the following error if you try do delete it manualy:

There is a sharing violation the file may be in use.

So what im thinking is how is this possible when you use FTP (to delete files no matter if somebody else is accessing them?) and how can i make my thing to work?

Is it a coding issue???
is it a IIS issue?
Anybody can help please?

 
It's actually a OS issue. What is happening is exactly what the error describes. You are trying to delete something that the OS is using to service someone else. Best way to try to fix it, is to make sure that all other users are only getting a read only copy. Then the OS only needs it for the time it takes to generate the read. But becuase the other users can't alter the doc/file, the OS will release it's lock on the file once it is done delivering it to the other user. The money's gone, the brain is shot.....but the liquor we still got.
 
i have discovered that sometimes when a file is in use that cannot be deleted, it can still be renamed.

perhaps you could try this, and if it works, rename the file to something obscure, wait for a minute or so, then delete the newly renamed file at your leisure.

just a suggestion.

good luck!
 
Thanks people for your comments. Im on it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top