I'm sometimes getting the following error message:
Rebex.Net.FtpException
-----------------
Cannot change working directory back to the original location.
-----------------
at Rebex.Net.Ftp.CO(String A)
at Rebex.Net.Ftp.IO(String A)
at Rebex.Net.Ftp.PP(String A)
at ZetaProducerPublishing.Runtime.Protocols.FtpProtocol.FtpEngine.ensureDirectoryCreatedDuringSendFile(String remoteFolderPath, Boolean recursive) in c:\P\Zeta Producer\12\Zeta Producer Publishing\Source\Runtime\Protocols\FtpProtocol\FtpEngine.cs:Zeile 760.
at ...
I do believe that it is in my source code line:
var exists = _ftp.DirectoryExists(remoteFolderPath);
Although the DirectoryExists
does not occur in the above stack trace.
On the other hand, I never call the Rebex.Net.Ftp.PP
function.
Environment:
When the error occurred, my code had an FTP connection against an IIS FTP service on a Windows 2012 Server, although I don't know whether this is IIS-specific.
My questions:
- What could be the cause of this error?
- How can I deal with this error?
Update 1
This is the log as of request:
----------------------------------------
2015-05-21 21:06:56,440 [7] INFO - [O] Connecting to zeta-sw.com:21 using Ftp 4.0.5584.0.
2015-05-21 21:06:56,440 [7] INFO - [O] Using proxy none.
2015-05-21 21:06:56,475 [7] INFO - [R] 220 Microsoft FTP Service
2015-05-21 21:06:56,479 [7] INFO - [S] USER SomeUser
2015-05-21 21:06:56,489 [7] INFO - [R] 331 Password required
2015-05-21 21:06:56,490 [7] INFO - [S] PASS ***************
2015-05-21 21:06:56,502 [7] INFO - [R] 230 User logged in.
2015-05-21 21:06:56,504 [7] INFO - [S] FEAT
2015-05-21 21:06:56,514 [7] INFO - [R] 211-Extended features supported:
2015-05-21 21:06:56,514 [7] INFO - [R] LANG EN*
2015-05-21 21:06:56,514 [7] INFO - [R] UTF8
2015-05-21 21:06:56,514 [7] INFO - [R] AUTH TLS;TLS-C;SSL;TLS-P;
2015-05-21 21:06:56,514 [7] INFO - [R] PBSZ
2015-05-21 21:06:56,514 [7] INFO - [R] PROT C;P;
2015-05-21 21:06:56,514 [7] INFO - [R] CCC
2015-05-21 21:06:56,514 [7] INFO - [R] HOST
2015-05-21 21:06:56,515 [7] INFO - [R] SIZE
2015-05-21 21:06:56,515 [7] INFO - [R] MDTM
2015-05-21 21:06:56,515 [7] INFO - [R] REST STREAM
2015-05-21 21:06:56,515 [7] INFO - [R] 211 END
2015-05-21 21:06:56,517 [7] INFO - [S] OPTS UTF8 ON
2015-05-21 21:06:56,527 [7] INFO - [R] 200 OPTS UTF8 command successful - UTF8 encoding now ON.
2015-05-21 21:06:56,536 [7] INFO - [S] TYPE I
2015-05-21 21:06:56,546 [7] INFO - [R] 200 Type set to I.
2015-05-21 21:06:56,547 [7] INFO - [S] MDTM .
2015-05-21 21:06:56,557 [7] INFO - [R] 550
2015-05-21 21:06:56,557 [7] INFO - [S] SIZE .
2015-05-21 21:06:56,567 [7] INFO - [R] 550
2015-05-21 21:06:56,568 [7] INFO - [S] PWD
2015-05-21 21:06:56,578 [7] INFO - [R] 257 "/" is current directory.
2015-05-21 21:06:56,578 [7] INFO - [S] CWD /projekte.zeta-sw.net
2015-05-21 21:06:56,589 [7] INFO - [R] 250 CWD command successful.
2015-05-21 21:06:56,589 [7] INFO - [S] CWD /
2015-05-21 21:06:56,599 [7] INFO - [R] 250 CWD command successful.
2015-05-21 21:06:56,599 [7] INFO - [S] PWD
2015-05-21 21:06:56,609 [7] INFO - [R] 257 "/" is current directory.
2015-05-21 21:06:56,609 [7] INFO - [S] CWD /projekte.zeta-sw.net/projektname-5
2015-05-21 21:06:56,620 [7] INFO - [R] 550
2015-05-21 21:06:56,621 [7] INFO - [S] MKD /projekte.zeta-sw.net/projektname-5
2015-05-21 21:06:56,632 [7] INFO - [R] 257 "/projekte.zeta-sw.net/projektname-5" directory created.
2015-05-21 21:06:56,644 [7] INFO - [S] PASV
2015-05-21 21:06:56,654 [7] INFO - [R] 227 Entering Passive Mode (213,174,38,64,240,174).
2015-05-21 21:06:56,670 [7] INFO - [S] STOR /projekte.zeta-sw.net/projektname-5/305e22f7-d497-4629-ac92-74bf4af64524.zp12-publish-test
2015-05-21 21:06:56,680 [7] INFO - [R] 125 Data connection already open; Transfer starting.
2015-05-21 21:06:56,695 [7] INFO - [R] 226 Transfer complete.
2015-05-21 21:06:56,699 [7] INFO - [S] SIZE /projekte.zeta-sw.net/projektname-5/305e22f7-d497-4629-ac92-74bf4af64524.zp12-publish-test
2015-05-21 21:06:56,709 [7] INFO - [R] 213 61
2015-05-21 21:06:56,711 [7] INFO - [S] DELE /projekte.zeta-sw.net/projektname-5/305e22f7-d497-4629-ac92-74bf4af64524.zp12-publish-test
2015-05-21 21:06:56,721 [7] INFO - [R] 250 DELE command successful.
2015-05-21 21:06:56,723 [7] INFO - [S] CWD /projekte.zeta-sw.net/projektname-5
2015-05-21 21:06:56,734 [7] INFO - [R] 250 CWD command successful.
2015-05-21 21:06:56,742 [7] INFO - [S] TYPE A
2015-05-21 21:06:56,752 [7] INFO - [R] 200 Type set to A.
2015-05-21 21:06:56,752 [7] INFO - [S] PASV
2015-05-21 21:06:56,762 [7] INFO - [R] 227 Entering Passive Mode (213,174,38,64,240,175).
2015-05-21 21:06:56,775 [7] INFO - [S] LIST
2015-05-21 21:06:56,785 [7] INFO - [R] 125 Data connection already open; Transfer starting.
2015-05-21 21:06:56,787 [7] INFO - [R] 226 Transfer complete.
2015-05-21 21:06:56,789 [7] INFO - [S] RMD /projekte.zeta-sw.net/projektname-5
2015-05-21 21:06:56,799 [7] INFO - [R] 250 RMD command successful.
2015-05-21 21:06:56,806 [7] INFO - [S] TYPE I
2015-05-21 21:06:56,816 [7] INFO - [R] 200 Type set to I.
2015-05-21 21:06:56,817 [7] INFO - [S] PWD
2015-05-21 21:06:56,827 [7] INFO - [R] 257 "/projekte.zeta-sw.net/projektname-5" is current directory.
2015-05-21 21:06:56,827 [7] INFO - [S] CWD /projekte.zeta-sw.net
2015-05-21 21:06:56,889 [7] INFO - [R] 250 CWD command successful.
2015-05-21 21:06:56,889 [7] INFO - [S] CWD /projekte.zeta-sw.net/projektname-5
2015-05-21 21:06:56,900 [7] INFO - [R] 550
2015-05-21 21:06:56,902 [7] INFO - [O] Rebex.Net.FtpException: Cannot change working directory back to the original location.
bei Rebex.Net.Ftp.CO(String A)
bei Rebex.Net.Ftp.IO(String A)
bei Rebex.Net.Ftp.PP(String A)
----------------------------------------