Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
File.Copy and lock file
Message
De
19/02/2014 17:04:42
 
 
À
19/02/2014 16:50:49
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:
01594719
Vues:
23
>>Do you have any control over the secondary process? Can it be configured to wait XX seconds after seeing a new file appear, before it tries to copy it?
>
>I believe using a .TMP and switching it with a rename at the end is better.
>
>>If this is the root cause of the problem, why is it not happening with *all* the files you copy?
>
>Because that is the only one subject to such monitoring for being handled somewhere else as soon as it exists.

Ah. I was under the impression you were transferring millions of files weekly, and on rare occasions you would get errors on *random* files. If the errors happen only to one file name, and you have a secondary process on the lookout for that particular file name it's pretty certain that's the cause.

In that case the .TMP file approach should work. But you'd have to make sure your file copy operation to that .TMP file is synchronous and run the rename only after it's finished.

In the past I've run into occasional errors renaming files or folders on Samba volumes. But if you're working against a good-quality NAS that's designed for Windows compatibility, you should be OK.
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