Hello.
I have some trouble with FtpWebRequest class.
I use it for connection to two ftp servers
The first server is working perfectly, but when i use the same programm to connect to another one the "The underlying connection was closed: The server committed a protocol violation." exception is thrown when I call GetResponse method.
I found only one difference between servers.
The first server returns:
- 220 Hello k-net ftp server
The second FTP return the same banner but ON RUSSIAN Lang!!!
- 220 ! !
Is any UseUnsafeHeaderParsing property exists for FTPWebRequest, like for HTTP
P.S> I'am not using SSL!
The sources is here:
///...
FtpWebRequest
listRequest =(
FtpWebRequest)WebRequest.Create(listUrl);listRequest.UsePassive =
false; //truelistRequest.Method =
WebRequestMethods.Ftp.ListDirectory; FtpWebResponse listResponse =(
FtpWebResponse)listRequest.GetResponse(); //WebException is HERE!!!reader =
new StreamReader(listResponse.GetResponseStream()); while (!reader.EndOfStream)///...

FtpWebRequest GetResponse throw The server committed a protocol violation :(
get_rad
ebj
Hi Mike,
Any hopes of getting a fix anytime soon I am also having the problem.
Thanks,
marion
AbelMorelos
JustJFe
Spasibo :)
teone
t2nolan
OK. I configure the extarnal ftp to the same configuration as my and exception still there!
URL with login/pass:
ftp://throw:throw@devgroup.mephist.ru
The server banner message contains russian symbols.
FTPWebRequest is dead :(
j1rider
I am having trouble connecting to a remote FTP server.
I am getting the error (The remote server returned an error: (530) Not logged in.).
But I can connect to this FTP server from the IE using the same credentials.
Any help would be appreciated.
-Arul
Josh Kinder
jcman
Amaan
Hello Mike,
We are currently encountering exactly the same problem: FtpWebRequest GetResponse throws The server committed a protocol violation
Because you have confirmed there is an error within FtpWebRequest I was wondering whether this problem has already been resolved and a new version of FtpWebRequest is available
If not, is there some sort of workaround available
Thanks a lot,
Bas Pronk
Zurk
Hi Mike
Do you know of a fix for this error I am getting the same error (i.e. The underlying connection was closed: The server committed a protocol violation.) when connecting to a remote FTP server. here is a snippet from my error logs.
---------------------------------------------------------------------------------------
7/6/2006 7:09:14 AM
Source Exception: System - SyncRequestCallback
Message: The underlying connection was closed: The server committed a protocol violation.
Trace: at System.Net.FtpWebRequest.SyncRequestCallback(Object obj)
at System.Net.FtpWebRequest.RequestCallback(Object obj)
at System.Net.CommandStream.Abort(Exception e)
at System.Net.FtpWebRequest.FinishRequestStage(RequestStage stage)
at System.Net.FtpWebRequest.GetResponse()
at MSS.FTP.FTPclient.GetStringResponse(FtpWebRequest pFTP)
---------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------
7/6/2006 7:09:14 AM
Source Exception: FTP - ListDirectoryDetail
Message: Object reference not set to an instance of an object.
Trace: at MSS.FTP.FTPclient.ListDirectoryDetail(String pDirectory)
Additional Info
Error occoured while attempting a detailed directory listing of /DLD/NP1
---------------------------------------------------------------------------------------
daftest
. Many thanks for your attention!
Good luck!
Darren Parker - MSFT
Darren Stones
Hello!
One question...
Is the problem already resolved
Can I change the banner of FTP back to English ;)