Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot rename in FTP with .NET Framework 4.0
Message
De
21/07/2010 02:54:01
 
 
À
21/07/2010 02:06:24
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01473268
Message ID:
01473269
Vues:
39
It seems .NET Framework 4.0 doesn't allow to rename a file with a full directory path. So, we have to only include the file name. This is a major problem. I need to upload into a temporary directory. Then, I need to rename that file so it would appear in the production directory. I cannot upload directly into the production directory as the master file should be running up until the last second before I delete it and rename the temporary file into the production directory. So, basically, before, it was going like this:

1. Upload into Temp\Something.dll
2. Delete Bin\Something.dll
3. Rename Temp\Something.dll to Bin\Something.dll

But, now, I can only make the RenameTo to work like this:

1. Upload into Temp\Something.dll
2. Rename Something.dll to Something2.dll

There is no move command with WebRequestMethods. So, the only way I have found so far to move a file into another directory is to use the RenameTo command. But, this doesn't work anymore and gives 553 File name not allowed.

Anyone would have a suggestion on how to resolve that issue?
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform