Hello, I found the solution. The problem is the Current Working Directory of the ftp user. If you type a url like ftp://<server>/path/test.txt it is used as a relative path ro the working directory. For example CWD is /test then the used path is /test/path/test.txt. If you want to use an absolute path, you have to type the url like ftp://<server>//path/test.txt. Then the file is uploaded in the folder /path/test.txt, without exception.
The URI may be relative or absolute. If the URI is of the form "ftp://contoso.com/%2fpath" (%2f is an escaped '/'), then the URI is absolute, and the current directory is /path. If, however, the URI is of the form "ftp://contoso.com/path", first the .NET Framework logs into the FTP server (using the user name and password set by the Credentials property), then the current directory is set to <UserLoginDirectory>/path.
For example, the URL "ftp://myname@host.dom/%2Fetc/motd" is interpreted by FTP-ing to "host.dom", logging in as "myname" (prompting for a password if it is asked for), and then executing "CWD /etc" and then "RETR motd".
This has a different meaning from "ftp://myname@host.dom/etc/motd" which would "CWD etc" and then "RETR motd"; the initial "CWD" might be executed relative to the default directory for "myname".
On the other hand, "ftp://myname@host.dom//etc/m
http://www.cs.tut.fi/~jkorpela/ftpurl.html