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:06:24
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Cannot rename in FTP with .NET Framework 4.0
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:
01473268
Vues:
180
I cannot rename a file anymore in FTP with .NET Framework 4.0. Since I recompiled my application, after the upload, when I try to rename the file, I get an error:

(553) File name not allowed

Nothing has changed on the server. I even tried that on a client server. It is the same result. The only factor is that I changed my exe on my local PC.

Here is the code:
            Try

                ' FTP setup
                loFtpWebRequest = System.Net.FtpWebRequest.Create(New Uri(lcURI))
                loFtpWebRequest.Credentials = New System.Net.NetworkCredential(cUsername, cPassword)
                loFtpWebRequest.Method = System.Net.WebRequestMethods.Ftp.Rename

                ' The new name
                loFtpWebRequest.RenameTo = lcURI2

                ' Rename the file
                loFtpWebRequest.GetResponse().Close()

                llSuccess = True
            Catch loError As Exception
                lError = True
                cError = cUnableToRenameTheFile + " " + lcURI + " " + cTo + " " + lcURI2 + "." + _
                 oApp.cCR + oApp.cCR + loError.Message
            End Try
The lcURI is like this:

ftp://something.myserver.com/directory/directory/Temp/Framework.dll

lcURI2 is like this:

directory/directory/Bin/Framework.dll
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform