Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File.Copy and lock file
Message
De
19/02/2014 14:13:52
 
 
À
19/02/2014 11:28:25
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01594636
Message ID:
01594684
Vues:
30
>>To be clear : Can you confirm that it is the CopyFile() that is throwing the exception - not the second program that attempts to access the file.....
>
>...it is the copy file.
>
>>Should be in the exception stack ?
>
>Yes, but this is a very rare situation and I cannot reproduce it right now.

A few thoughts:

1. I'm not sure you've actually answered Viv's question about being sure that the copy operation has actually started before you get the error message. Most OSs will retry file operations for a while before timing out. Are you certain you're not hitting the problem immediately but not seeing it for X seconds while the OS retries?

2. You may not think other processes could access your file but there could be processes such as scheduled backups, background defrag etc.

3. Is antivirus real-time scanning in play on the source computer, destination computer or the one throwing the error you're seeing? Is it always different files that cause the error? Are they particularly large, or do they have an extension (e.g. .EXE) that might make AV pay them special attention?

4. Is the source file on a NAS? My understanding is NAS support for simple file operations such as copying is good but if all else fails it might be worth investigating
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform